classification
Title: Docs: can globals() be updated?
Type: Stage:
Components: Documentation Versions: Python 2.7
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, georg.brandl, guettli
Priority: normal Keywords:

Created on 2010-10-20 07:19 by guettli, last changed 2010-10-20 09:20 by georg.brandl. This issue is now closed.

Messages (2)
msg119192 - (view) Author: Thomas Guettler (guettli) Date: 2010-10-20 07:19
Hi,

the documentation of "globals()" is missing a note if you can update
the dictionary:

http://docs.python.org/library/functions.html?highlight=globals#globals

For "locals()" it is documented:
http://docs.python.org/library/functions.html?highlight=locals#locals
msg119196 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-10-20 09:20
It is documented, however, that globals() returns the dictionary of a module, which can be modified.  For locals(), the situation is quite more complicated, which is why the warning there is warranted.
History
Date User Action Args
2010-10-20 09:20:07georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg119196

resolution: works for me
2010-10-20 07:19:46guettlicreate