Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #12462 > unrolled thread
| Started by | Arnaud Delobelle <arnodel@gmail.com> |
|---|---|
| First post | 2011-08-31 07:35 +0100 |
| Last post | 2011-08-31 07:35 +0100 |
| 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 Arnaud Delobelle <arnodel@gmail.com> - 2011-08-31 07:35 +0100
| From | Arnaud Delobelle <arnodel@gmail.com> |
|---|---|
| Date | 2011-08-31 07:35 +0100 |
| Subject | Re: Returning a value from exec or a better solution |
| Message-ID | <mailman.594.1314772549.27778.python-list@python.org> |
On 30 August 2011 22:48, Rob Williscroft <rtw@rtw.me.uk> wrote: > Arnaud Delobelle wrote in > news:CAJ6cK1YVi3NQgdZOUdhAESf133pUkdazM1PkSP=p6xFaYVOHYA@mail.gmail.com in > gmane.comp.python.general: > >> On 30 August 2011 13:31, Jack Trades <jacktradespublic@gmail.com> wrote: >>> >>> >>> On Tue, Aug 30, 2011 at 2:37 AM, Rob Williscroft <rtw@rtw.me.uk> wrote: >>> >>>> >>>> > That's brilliant and works flawlessly. ś˙Thank you very much! >>>> >>>> If an impementation (as you say up thread) can populate globals >>>> or locals with whatever they want, then how do you know that last >>>> item added was the function definition the user supplied ? > >> 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. I haven't studied the docs but I'm certain that such an implementation would break a lot of code. -- Arnaud
Back to top | Article view | comp.lang.python
csiph-web