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

anatoly techtonik report at bugs.python.org
Wed Mar 27 13:03:00 CET 2013


anatoly techtonik added the comment:

Amaury, from user's point of view (I am not a core developer - I just need to troubleshoot complicated Python code) the object (the internal structure) returned by locals() has different behavior than a normal dict.

Normal dict in Python is updated by user code (which "I as a user" can see and can inspect for further troubleshooting) and for locals's dict this is not correct. 

If dict and locals's object are of the same type, I'd expect them to be interchangeable.

By proposing a documentation fix as a final remedy, please think about the entry point through which users come to this "trap".

----------

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


More information about the docs mailing list