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

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.news-service.com!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.012
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'exec': 0.07; 'globals': 0.09; 'received:188.220': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'say.': 0.09; 'am,': 0.12; 'processed.': 0.16; 'wrote:': 0.16; '>>>': 0.18; 'wrote': 0.20; 'tue,': 0.23; 'aug': 0.24; 'function': 0.27; 'definition': 0.30; "isn't": 0.33; 'to:addr:python-list': 0.33; 'header:User-Agent:1': 0.34; '(as': 0.34; 'things': 0.34; 'header:X-Complaints-To:1': 0.35; 'url:python': 0.36; 'received:org': 0.38; 'url:org': 0.38; 'subject:: ': 0.39; 'url:docs': 0.39; 'user': 0.39; 'to:addr:python.org': 0.39; 'subject:from': 0.40; 'received:188': 0.68; 'want,': 0.71; '30,': 0.74; 'locals': 0.84; 'received:bethere.co.uk': 0.84; 'subject:value': 0.84; 'url:reference': 0.84; 'subject:better': 0.93
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Rob Williscroft <rtw@rtw.me.uk>
Subject Re: Returning a value from exec or a better solution
Date Tue, 30 Aug 2011 19:28:52 +0000 (UTC)
References <CAG5udOgxSmQrVOm+fPO_wsJsDLeR6jie0AgJFvauODd+2eA21g@mail.gmail.com> <4E5D29C8.8010206@stoneleaf.us>
X-Gmane-NNTP-Posting-Host 188-220-43-229.zone11.bethere.co.uk
User-Agent Xnews/5.04.25
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.578.1314732546.27778.python-list@python.org> (permalink)
Lines 17
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1314732546 news.xs4all.nl 2497 [2001:888:2000:d::a6]:47618
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:12443

Show key headers only | 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