[Python-checkins] CVS: python/dist/src/Lib copy.py,1.21,1.22

Guido van Rossum gvanrossum@users.sourceforge.net
Fri, 28 Sep 2001 11:16:16 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv25906

Modified Files:
	copy.py 
Log Message:
Add complex to the dispatch tables, to avoid going through the whole
rigmarole of __reduce__.


Index: copy.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/copy.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** copy.py	2001/09/28 18:13:29	1.21
--- copy.py	2001/09/28 18:16:13	1.22
***************
*** 97,100 ****
--- 97,104 ----
  d[types.LongType] = _copy_atomic
  d[types.FloatType] = _copy_atomic
+ try:
+     d[types.ComplexType] = _copy_atomic
+ except AttributeError:
+     pass
  d[types.StringType] = _copy_atomic
  try:
***************
*** 185,188 ****
--- 189,196 ----
  d[types.LongType] = _deepcopy_atomic
  d[types.FloatType] = _deepcopy_atomic
+ try:
+     d[types.ComplexType] = _deepcopy_atomic
+ except AttributeError:
+     pass
  d[types.StringType] = _deepcopy_atomic
  try: