A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2019-May/157743.html below:

[Python-Dev] PEP 558: Defined semantics for locals()

[Python-Dev] PEP 558: Defined semantics for locals()Terry Reedy tjreedy at udel.edu
Mon May 27 14:05:32 EDT 2019
On 5/27/2019 9:52 AM, Richard Damon wrote:
> On 5/27/19 9:12 AM, Terry Reedy wrote:

>> I believe that the situation is or can be thought of as this: there is
>> exactly 1 function locals dict.

per function invocation, or more generally, as Guido said, per stack 
frame.  This part is obvious to me, but I should have been clearer.

>>  Initially, it is empty and
>> inaccessible (unusable) from code.  Each locals() call updates the
>> dict to a current snapshot and returns it.
>>
> I had a similar concern, and one BIG issue with it being define this way
> is that you get a fundamental re-entrancy problem. If module a uses
> locals(), and then calls module b that uses locals(), module a has lost
> its usage.

No. Sorry about being unclear.

-- 
Terry Jan Reedy


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4