[pywin32-checkins] pywin32/Pythonwin/pywin/tools browser.py, 1.13, 1.14
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2009-01-05 10:57:09
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29754/Pythonwin/pywin/tools Modified Files: browser.py Log Message: modernization for type names and descriptors Index: browser.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools/browser.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** browser.py 11 Dec 2008 06:54:19 -0000 1.13 --- browser.py 5 Jan 2009 10:57:01 -0000 1.14 *************** *** 13,17 **** from types import * - special_names = [ '__doc__', '__name__', '__self__' ] --- 13,16 ---- *************** *** 58,62 **** except (AttributeError, TypeError): pass ! if ob: lst.insert(0, HLIDocString( ob, "Doc" )) --- 57,65 ---- except (AttributeError, TypeError): pass ! # I don't quite grok descriptors enough to know how to ! # best hook them up. Eg: ! # >>> object.__getattribute__.__class__.__doc__ ! # <attribute '__doc__' of 'wrapper_descriptor' objects> ! if ob and isinstance(ob, str): lst.insert(0, HLIDocString( ob, "Doc" )) *************** *** 254,272 **** return 0 ! TypeMap = { ClassType : HLIClass, FunctionType: HLIFunction, ! TupleType: HLITuple, ! DictType: HLIDict, ! ListType: HLIList, ModuleType: HLIModule, - InstanceType : HLIInstance, CodeType : HLICode, BuiltinFunctionType : HLIBuiltinFunction, FrameType : HLIFrame, TracebackType : HLITraceback, ! StringType : HLIString, ! IntType: HLIPythonObject, ! LongType: HLIPythonObject, ! FloatType: HLIPythonObject, } try: --- 257,274 ---- return 0 ! TypeMap = { type : HLIClass, FunctionType: HLIFunction, ! tuple: HLITuple, ! dict: HLIDict, ! list: HLIList, ModuleType: HLIModule, CodeType : HLICode, BuiltinFunctionType : HLIBuiltinFunction, FrameType : HLIFrame, TracebackType : HLITraceback, ! str : HLIString, ! int: HLIPythonObject, ! ## LongType: HLIPythonObject, - hrm - fixme for py2k ! float: HLIPythonObject, } try: |