[docs] [issue17546] Document the circumstances where the locals() dict gets updated

Terry J. Reedy report at bugs.python.org
Sun Mar 31 00:23:25 CET 2013


Terry J. Reedy added the comment:

/non-local/Non-local/ If we add the hyphen, perhaps we should add 'non-global' also.

Thanks for the concrete draft. It is definitely an improvement.

The last sentence is somewhat redundant with the second. The problem with the last sentence is that it only said that changes to the dict might not propagate back the the namespace, while is is also true that changes to the namespace might or might not propagate to the dict. The new second sentence says both. In addition, I somewhat disagree with 'should not modify'. A person could have a perfectly good reason to do so, but they should not expect propagation of the changes. So I am tempted to drop the last sentence. On the other hand, 'undefined' should be somewhere.

----------

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


More information about the docs mailing list