Rob Williscroft wrote:
Arnaud Delobelle wrote:

That's not an issue. The last statement that is executed will be the
"def" statement.

You don't know that, an implementation may for example set __bultins__ to None, prior to returning, its not an unreasonable thing to do and
the docs don't say they can't.

Actually, I think it is unreasonable -- by modifying the globals or locals objects *after* the code has been exec'd, information is being removed about the environment the code ran in, making introspection (if nothing else) more difficult.

Good reasons are required to make life difficult (at least with Python).

~Ethan~
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to