Concise idiom to initialize dictionaries

Terry Reedy tjreedy at udel.edu
Wed Nov 10 02:53:14 CET 2004


<exarkun at intarweb.us> wrote in message
>  Mutating the objects returned by both locals() and globals() is a no-no. 
> They are intended to provide _read only_ access to those two scopes.

True for locals(), not true, I believe for globals().  Check the lib ref 
for the builtin globals() function.

tjr






More information about the Python-list mailing list