Concise idiom to initialize dictionaries

Terry Reedy tjreedy at udel.edu
Tue Nov 9 20:53:14 EST 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