[Python-checkins] python/dist/src/Lib UserDict.py,1.24,1.25
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Thu Dec 4 15:04:12 EST 2003
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv26926
Modified Files:
UserDict.py
Log Message:
SF bug #849662. Dramatically, improve comparison speed for "if shl == None".
Index: UserDict.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/UserDict.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** UserDict.py 6 Mar 2003 23:54:27 -0000 1.24
--- UserDict.py 4 Dec 2003 20:04:09 -0000 1.25
***************
*** 156,159 ****
--- 156,161 ----
return repr(dict(self.iteritems()))
def __cmp__(self, other):
+ if other is None:
+ return 1
if isinstance(other, DictMixin):
other = dict(other.iteritems())
More information about the Python-checkins
mailing list