]> granicus.if.org Git - python/commit
Do not copy free variables to locals in class namespaces.
authorJeremy Hylton <jeremy@alum.mit.edu>
Mon, 26 Feb 2007 18:41:18 +0000 (18:41 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Mon, 26 Feb 2007 18:41:18 +0000 (18:41 +0000)
commit759410b372915be0de2a225d7fc6b71dcfae6db3
treee0a670017cde5e0b337ff574deae09daa9ff4c92
parent7b7d1c8282fa2599e2f132c401defde3c9b42e3f
Do not copy free variables to locals in class namespaces.

Fixes bug 1569356, but at the cost of a minor incompatibility in
locals().  Add test that verifies that the class namespace is not
polluted.  Also clarify the behavior in the library docs.

Along the way, cleaned up the dict_to_map and map_to_dict
implementations and added some comments that explain what they do.
Doc/lib/libfuncs.tex
Lib/test/test_scope.py
Objects/frameobject.c