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

Guido van Rossum python-dev@python.org
Mon, 27 Nov 2000 13:53:18 -0800


Update of /cvsroot/python/python/dist/src/Lib
In directory slayer.i.sourceforge.net:/tmp/cvs-serv13333

Modified Files:
	copy.py 
Log Message:
Patch by Finn Bock to support PyStringMap in Jython.


Index: copy.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/copy.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** copy.py	2000/09/07 11:00:03	1.16
--- copy.py	2000/11/27 21:53:14	1.17
***************
*** 57,60 ****
--- 57,65 ----
  error = Error	# backward compatibility
  
+ try:
+     from org.python.core import PyStringMap
+ except ImportError:
+     PyStringMap = None
+ 
  def copy(x):
  	"""Shallow copy operation on arbitrary Python objects.
***************
*** 105,108 ****
--- 110,115 ----
  	return x.copy()
  d[types.DictionaryType] = _copy_dict
+ if PyStringMap is not None:
+     d[PyStringMap] = _copy_dict
  
  def _copy_inst(x):
***************
*** 201,204 ****
--- 208,213 ----
  	return y
  d[types.DictionaryType] = _deepcopy_dict
+ if PyStringMap is not None:
+     d[PyStringMap] = _deepcopy_dict
  
  def _keep_alive(x, memo):