summaryrefslogtreecommitdiff
path: root/Lib/copy.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/copy.py')
-rw-r--r--Lib/copy.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/copy.py b/Lib/copy.py
index 07f1d23f29..089d101c7c 100644
--- a/Lib/copy.py
+++ b/Lib/copy.py
@@ -51,6 +51,7 @@ __getstate__() and __setstate__(). See the documentation for module
import types
import weakref
from copyreg import dispatch_table
+import builtins
class Error(Exception):
pass
@@ -109,7 +110,7 @@ t = getattr(types, "CodeType", None)
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