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

2019年5月28日 17:25:55 -0700

Terry Reedy wrote:
I believe that the situation is or can be thought of as this: there is exactly 1 function locals dict. Initially, it is empty and inaccessible (unusable) from code. Each locals() call updates the dict to a current snapshot and returns it.
Yes, I understand *what's* happening, but not *why* it was designed
that way. Would it really be probihitively expensive to create a
fresh dict each time?
--
Greg
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to