locals() and globals()

Fredrik Lundh fredrik at pythonware.com
Sat Oct 14 16:59:40 CEST 2006

Paolo Pantaleo wrote:

> why accessing the names dictionary globals() and locals() gives
> different results?

the documentation has the answer:

   "The contents of this dictionary should not be modified;
   changes may not affect the values of local variables used
   by the interpreter"



More information about the Python-list mailing list