[Python-ideas] Jump to function as an an alternative to call function

Chris Barker chris.barker at noaa.gov
Thu Aug 16 15:35:55 EDT 2018


one more thought:

given that:


> > The contents of this dictionary should not be modified; changes may not
>> affect the values of local and free variables used by the interpreter.
>>
>
> and:
> """
> locals()
>
> Update and return a dictionary representing the current local symbol table.
>

I wonder why locals doesn't return a Mapping Proxy, or other read-only
mapping object?

If it's not guaranteed to be THE locals dict, and changes *may* not affect
the real one (but may), a read-only object seems like much safer idea.

-CHB

-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180816/c4f26296/attachment.html>


More information about the Python-ideas mailing list