]> granicus.if.org Git - python/commitdiff
Issue 2460: Make Ellipsis objects copyable.
authorRaymond Hettinger <python@rcn.com>
Mon, 24 Mar 2008 08:17:39 +0000 (08:17 +0000)
committerRaymond Hettinger <python@rcn.com>
Mon, 24 Mar 2008 08:17:39 +0000 (08:17 +0000)
Lib/copy.py
Misc/NEWS

index 35c666f7dc0fa7aba77e89d42a213cb0000911c9..3f2033f5ffd104cf3bcff9db46179923b5c862da 100644 (file)
@@ -101,7 +101,7 @@ def _copy_immutable(x):
     return x
 for t in (type(None), int, long, float, bool, str, tuple,
           frozenset, type, xrange, types.ClassType,
-          types.BuiltinFunctionType,
+          types.BuiltinFunctionType, type(Ellipsis),
           types.FunctionType):
     d[t] = _copy_immutable
 for name in ("ComplexType", "UnicodeType", "CodeType"):
@@ -197,6 +197,7 @@ _deepcopy_dispatch = d = {}
 def _deepcopy_atomic(x, memo):
     return x
 d[type(None)] = _deepcopy_atomic
+d[type(Ellipsis)] = _deepcopy_atomic
 d[int] = _deepcopy_atomic
 d[long] = _deepcopy_atomic
 d[float] = _deepcopy_atomic
index 04dec03c78820c81ed7c0553433679dd0aab93a5..54d955b20f86a5a28f34fb8f949705106d12f81c 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -66,6 +66,8 @@ Library
 - Issue #2432: give DictReader the dialect and line_num attributes
   advertised in the docs.
 
+- Issue #2460:  Make Ellipsis object copyable.
+
 - Issue #1681432:  Add triangular distribution to the random module
 
 - Issue #2136: urllib2's auth handler now allows single-quoted realms in the