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


Groups > comp.lang.python > #81838

Re: PyEval_GetLocals and unreferenced variables

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Gregory Ewing <greg.ewing@canterbury.ac.nz>
Newsgroups comp.lang.python
Subject Re: PyEval_GetLocals and unreferenced variables
Date Wed, 03 Dec 2014 19:06:12 +1300
Lines 10
Message-ID <ce7nikFgk8fU2@mid.individual.net> (permalink)
References <mailman.56.1417345204.28218.python-list@python.org> <20141202093510.4af9791e@tigger> <mailman.16492.1417518273.18130.python-list@python.org>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Trace individual.net GDOEeKl89pR6zRxphlMbNwnRzOY0kxlUuqxckj1fEDy+RO1XIO
Cancel-Lock sha1:GEM/qIodAR5FtqKCciM/9//vobQ=
User-Agent Mozilla Thunderbird 1.0.5 (Macintosh/20050711)
X-Accept-Language en-us, en
In-Reply-To <mailman.16492.1417518273.18130.python-list@python.org>
Xref csiph.com comp.lang.python:81838

Show key headers only | View raw


Ned Batchelder wrote:

> I would use thread locals for this: 
> https://docs.python.org/2/library/threading.html#threading.local

You could get dynamic scoping that way, but the OP
seems to want lexical scoping.

-- 
Greg

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


Thread

Re: PyEval_GetLocals and unreferenced variables Ned Batchelder <ned@nedbatchelder.com> - 2014-12-02 06:04 -0500
  Re: PyEval_GetLocals and unreferenced variables Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-12-03 19:06 +1300

csiph-web