[issue6925] Doc for locals and vars

Terry J. Reedy report at bugs.python.org
Fri Sep 18 23:02:46 CEST 2009


Terry J. Reedy <tjreedy at udel.edu> added the comment:

OK. Same is true of vars() also. So I suggest that current locals()
entry be changed to

"Update and return a dictionary representing the current local symbol
table. In function blocks, this includes nonlocal names.

Note
The contents of this dictionary should not be modified; changes may not
affect the values of local (or nonlocal) variables used by the interpreter."

and vars() first sentence be simplified to "Without arguments, same as
locals()." to follow the DRY principle.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6925>
_______________________________________


More information about the Python-bugs-list mailing list