[docs] [issue17546] Document the circumstances where the locals() dict gets updated
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>
More information about the docs