Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/mfc
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv24802/Pythonwin/pywin/mfc
Modified Files:
activex.py afxres.py object.py
Log Message:
Various modernizations to .py code via the py3k branch.
Index: object.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/mfc/object.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** object.py 1 Oct 2008 14:44:53 -0000 1.4
--- object.py 14 Nov 2008 00:22:25 -0000 1.5
***************
*** 31,35 ****
self._obj_ = None
def close(self):
! if self.__dict__.has_key('_obj_'):
if self._obj_ is not None:
self._obj_.AttachObject(None)
--- 31,35 ----
self._obj_ = None
def close(self):
! if '_obj_' in self.__dict__:
if self._obj_ is not None:
self._obj_.AttachObject(None)
Index: activex.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/mfc/activex.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** activex.py 18 Apr 2005 13:36:47 -0000 1.3
--- activex.py 14 Nov 2008 00:22:25 -0000 1.4
***************
*** 29,33 ****
def HookOleEvents(self):
dict = self._GetEventMap()
! for dispid, methodName in dict.items():
if hasattr(self, methodName):
self._obj_.HookOleEvent( getattr(self, methodName), dispid )
--- 29,33 ----
def HookOleEvents(self):
dict = self._GetEventMap()
! for dispid, methodName in dict.iteritems():
if hasattr(self, methodName):
self._obj_.HookOleEvent( getattr(self, methodName), dispid )
Index: afxres.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/mfc/afxres.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** afxres.py 10 Jan 2006 04:28:40 -0000 1.2
--- afxres.py 14 Nov 2008 00:22:25 -0000 1.3
***************
*** 54,58 ****
AFX_IDW_DOCKBAR_BOTTOM = 0xE81E
AFX_IDW_DOCKBAR_FLOAT = 0xE81F
! def AFX_CONTROLBAR_MASK(nIDC): return (1L << (nIDC - AFX_IDW_CONTROLBAR_FIRST))
AFX_IDW_PANE_FIRST = 0xE900
--- 54,58 ----
AFX_IDW_DOCKBAR_BOTTOM = 0xE81E
AFX_IDW_DOCKBAR_FLOAT = 0xE81F
! def AFX_CONTROLBAR_MASK(nIDC): return (1 << (nIDC - AFX_IDW_CONTROLBAR_FIRST))
AFX_IDW_PANE_FIRST = 0xE900
|