Author beazley
Recipients beazley
Date 2008-11-27.17:35:00
SpamBayes Score 0.000181456
Marked as misclassified No
Message-id <1227807302.43.0.654606733072.issue4447@psf.upfronthosting.co.za>
In-reply-to
Content
Is the following code valid Python 3 or not?

def foo():
    x = 1
    exec("x = 42")
    print(x)    # Prints 1  (exec has no effect)

I know there are a variety of issues surrounding exec(), function 
bodies, and other matters.   Just wondering if this sort of thing is now 
forbidden or not.
History
Date User Action Args
2008-11-27 17:35:02beazleysetrecipients: + beazley
2008-11-27 17:35:02beazleysetmessageid: <1227807302.43.0.654606733072.issue4447@psf.upfronthosting.co.za>
2008-11-27 17:35:01beazleylinkissue4447 messages
2008-11-27 17:35:00beazleycreate