[pywin32-checkins] pywin32/Pythonwin/pywin/tools hierlist.py, 1.11, 1.12
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2009-01-14 13:05:15
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3058/Pythonwin/pywin/tools Modified Files: hierlist.py Log Message: fix embarrasing trivial errors in py3k comparisons Index: hierlist.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools/hierlist.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** hierlist.py 5 Jan 2009 11:06:00 -0000 1.11 --- hierlist.py 14 Jan 2009 12:10:06 -0000 1.12 *************** *** 314,323 **** return None # same as other # for py3k/rich-comp sorting compatibility. ! def __cmp__(self): # this is always overridden, but to be sure... return cmp(id(self), id(other)) def __lt__(self, other): try: ! return self.__cmp__(self, other) < 0 except TypeError: # we want unrelated items to be sortable... --- 314,323 ---- return None # same as other # for py3k/rich-comp sorting compatibility. ! def __cmp__(self, other): # this is always overridden, but to be sure... return cmp(id(self), id(other)) def __lt__(self, other): try: ! return self.__cmp__(other) < 0 except TypeError: # we want unrelated items to be sortable... *************** *** 326,330 **** def __eq__(self, other): try: ! return __cmp__(self, other) == 0 except TypeError: # unrelated items compare false --- 326,330 ---- def __eq__(self, other): try: ! return self.__cmp__(other) == 0 except TypeError: # unrelated items compare false |