Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #12443

Re: Returning a value from exec or a better solution

From Rob Williscroft <rtw@rtw.me.uk>
Subject Re: Returning a value from exec or a better solution
Date 2011-08-30 19:28 +0000
References <CAG5udOgxSmQrVOm+fPO_wsJsDLeR6jie0AgJFvauODd+2eA21g@mail.gmail.com> <4E5D29C8.8010206@stoneleaf.us>
Newsgroups comp.lang.python
Message-ID <mailman.578.1314732546.27778.python-list@python.org> (permalink)

Show all headers | View raw


Ethan Furman wrote in news:4E5D29C8.8010206@stoneleaf.us in 
gmane.comp.python.general:

> Jack Trades wrote:
>> On Tue, Aug 30, 2011 at 2:37 AM, Rob Williscroft wrote:
>>> 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 ?
> 
> Because the implementation will add things before the exec is processed. 

How do you know this ?, it isn't what the docs say.

http://docs.python.org/reference/simple_stmts.html#the-exec-statement

Rob.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Returning a value from exec or a better solution Rob Williscroft <rtw@rtw.me.uk> - 2011-08-30 19:28 +0000

csiph-web