[Python-checkins] python/dist/src/Lib sets.py,1.24,1.25
tim_one@users.sourceforge.net
tim_one@users.sourceforge.net
Sun, 25 Aug 2002 12:21:29 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv3676/python/lib
Modified Files:
sets.py
Log Message:
Sped union by a factor of 3-4.
Index: sets.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/sets.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** sets.py 25 Aug 2002 19:12:45 -0000 1.24
--- sets.py 25 Aug 2002 19:21:27 -0000 1.25
***************
*** 155,159 ****
if not isinstance(other, BaseSet):
return NotImplemented
! result = self.__class__(self._data)
result._data.update(other._data)
return result
--- 155,160 ----
if not isinstance(other, BaseSet):
return NotImplemented
! result = self.__class__()
! result._data = self._data.copy()
result._data.update(other._data)
return result