Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #12455 > unrolled thread
| Started by | Ethan Furman <ethan@stoneleaf.us> |
|---|---|
| First post | 2011-08-30 15:31 -0700 |
| Last post | 2011-08-30 15:31 -0700 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Returning a value from exec or a better solution Ethan Furman <ethan@stoneleaf.us> - 2011-08-30 15:31 -0700
| From | Ethan Furman <ethan@stoneleaf.us> |
|---|---|
| Date | 2011-08-30 15:31 -0700 |
| Subject | Re: Returning a value from exec or a better solution |
| Message-ID | <mailman.588.1314742485.27778.python-list@python.org> |
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~
Back to top | Article view | comp.lang.python
csiph-web