Message76508
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:02 | beazley | set | recipients:
+ beazley |
2008-11-27 17:35:02 | beazley | set | messageid: <1227807302.43.0.654606733072.issue4447@psf.upfronthosting.co.za> |
2008-11-27 17:35:01 | beazley | link | issue4447 messages |
2008-11-27 17:35:00 | beazley | create | |
|