[pywin32-checkins] pywin32/com/win32comext/axdebug expressions.py, 1.5, 1.6
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-12-04 07:05:49
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axdebug In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3054/com/win32comext/axdebug Modified Files: expressions.py Log Message: py3k friendly; don't check for 'has_key' to see if dictlike Index: expressions.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axdebug/expressions.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** expressions.py 18 Jun 2006 13:18:26 -0000 1.5 --- expressions.py 4 Dec 2008 07:05:45 -0000 1.6 *************** *** 70,78 **** def MakeEnumDebugProperty(object, dwFieldSpec, nRadix, iid, stackFrame = None): name_vals = [] ! if hasattr(object, "has_key"): # If it is a dict. ! name_vals = object.items() dictionary = object elif hasattr(object, "__dict__"): #object with dictionary, module ! name_vals = object.__dict__.items() dictionary = object.__dict__ infos = [] --- 70,78 ---- def MakeEnumDebugProperty(object, dwFieldSpec, nRadix, iid, stackFrame = None): name_vals = [] ! if hasattr(object, "items") and hasattr(object, "keys"): # If it is a dict. ! name_vals = object.iteritems() dictionary = object elif hasattr(object, "__dict__"): #object with dictionary, module ! name_vals = object.__dict__.iteritems() dictionary = object.__dict__ infos = [] |