[pywin32-checkins] pywin32/Pythonwin/pywin/framework/editor ModuleBrowser.py, 1.9, 1.10
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2009-02-16 13:17:08
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/editor In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25428/Pythonwin/pywin/framework/editor Modified Files: ModuleBrowser.py Log Message: Death to cmp (in py3k at least) - long live richcmp Index: ModuleBrowser.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/editor/ModuleBrowser.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ModuleBrowser.py 23 Oct 2008 07:39:12 -0000 1.9 --- ModuleBrowser.py 16 Feb 2009 11:35:10 -0000 1.10 *************** *** 35,40 **** self.lineno = lineno self.suffix = suffix ! def __cmp__(self, other): ! return cmp(self.name, other.name) def GetText(self): return self.name + self.suffix --- 35,42 ---- self.lineno = lineno self.suffix = suffix ! def __lt__(self, other): ! return self.name < other.name ! def __eq__(self, other): ! return self.name == other.name def GetText(self): return self.name + self.suffix *************** *** 64,74 **** self.super = []; self.methods = {} HierListCLBRItem.__init__(self, name, file, lineno, suffix) - def __cmp__(self,other): - ret = cmp(self.name,other.name) - if ret==0 and (self is not other) and self.file==other.file: - self.methods = other.methods - self.super = other.super - self.lineno = other.lineno - return ret def GetSubList(self): r1 = [] --- 66,69 ---- |