bob gailer added the comment: On 3/27/2013 9:48 AM, anatoly techtonik wrote: > anatoly techtonik added the comment: > > Example: > > l = locals() > z = dict(a=5, b=3) > > lc = dict(l) > zc = dict(z) > > print(lc == l) > print(zc == z) > > Gives: > > False > True Expected behavior. lc is not another reference to locals(). It refers to a new object. zc = ... updates locals() but not lc
---------- nosy: +bgailer title: Document the circumstances where the locals() dict gets updated -> Document the circumstances where the locals() dict gets updated _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17546> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com