block scope?

Paul Rubin http
Sat Apr 7 20:42:53 EDT 2007

aleax at (Alex Martelli) writes:
> > exec?
> option 1: that just runs the compiler a bit later ...

Besides exec, there's also locals(), i.e.
   locals['x'] = 5
can shadow a variable.  Any bad results are probably deserved ;)

More information about the Python-list mailing list