Message 185335 - Python tracker

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Content
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