[Python-checkins] r84497 - python/branches/py3k/Lib/copy.py
antoine.pitrou
python-checkins at python.org
Sat Sep 4 19:46:44 CEST 2010
Author: antoine.pitrou
Date: Sat Sep 4 19:46:44 2010
New Revision: 84497
Log:
Fix running the copy module from the command-line (however use{ful,less} it may be).
Modified:
python/branches/py3k/Lib/copy.py
Modified: python/branches/py3k/Lib/copy.py
==============================================================================
--- python/branches/py3k/Lib/copy.py (original)
+++ python/branches/py3k/Lib/copy.py Sat Sep 4 19:46:44 2010
@@ -51,6 +51,7 @@
import types
import weakref
from copyreg import dispatch_table
+import builtins
class Error(Exception):
pass
@@ -109,7 +110,7 @@
if t is not None:
d[t] = _copy_immutable
for name in ("complex", "unicode"):
- t = globals()['__builtins__'].get(name)
+ t = getattr(builtins, name, None)
if t is not None:
d[t] = _copy_immutable
More information about the Python-checkins
mailing list