Author beazley
Recipients beazley
Date 2008-11-27.17:35:00
SpamBayes Score 0.000181456
Marked as misclassified No
Message-id <>
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.
Date User Action Args
2008-11-27 17:35:02beazleysetrecipients: + beazley
2008-11-27 17:35:02beazleysetmessageid: <>
2008-11-27 17:35:01beazleylinkissue4447 messages
2008-11-27 17:35:00beazleycreate