[pywin32-checkins] pywin32/Pythonwin/pywin/tools browser.py,1.5,1.6
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2004-04-09 11:47:15
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31101/pywin/tools Modified Files: browser.py Log Message: Try and work with "new-style" classes Index: browser.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools/browser.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** browser.py 7 Feb 2004 02:06:57 -0000 1.5 --- browser.py 9 Apr 2004 11:33:50 -0000 1.6 *************** *** 91,99 **** def CalculateIsExpandable(self): ! try: ! if self.myobject.__doc__: ! return 1 ! except (AttributeError, TypeError): ! pass try: for key in self.myobject.__dict__.keys(): --- 91,96 ---- def CalculateIsExpandable(self): ! if hasattr(self.myobject, '__doc__'): ! return 1 try: for key in self.myobject.__dict__.keys(): *************** *** 280,284 **** cls = TypeMap[type(ob)] except KeyError: ! cls = HLIPythonObject return cls( ob, name ) --- 277,284 ---- cls = TypeMap[type(ob)] except KeyError: ! if isinstance(ob, object): # 'new style' class ! cls = HLIInstance ! else: ! cls = HLIPythonObject return cls( ob, name ) |