Update of /cvsroot/pywin32/pywin32/com/win32comext/adsi/demos
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4132/com/win32comext/adsi/demos
Modified Files:
search.py test.py
Log Message:
move to dictionary iterators where possible
Index: search.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/adsi/demos/search.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** search.py 31 May 2005 12:43:16 -0000 1.3
--- search.py 4 Dec 2008 07:23:46 -0000 1.4
***************
*** 11,15 ****
# convert integer type to the 'typename' as known in the headerfiles.
if not ADsTypeNameMap:
! for n, v in adsicon.__dict__.items():
if n.startswith("ADSTYPE_"):
ADsTypeNameMap[v] = n
--- 11,15 ----
# convert integer type to the 'typename' as known in the headerfiles.
if not ADsTypeNameMap:
! for n, v in adsicon.__dict__.iteritems():
if n.startswith("ADSTYPE_"):
ADsTypeNameMap[v] = n
Index: test.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/adsi/demos/test.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test.py 24 Sep 2004 07:31:16 -0000 1.1
--- test.py 4 Dec 2008 07:23:46 -0000 1.2
***************
*** 124,128 ****
# Fill a map with VT_ datatypes, to give us better names:
vt_map = {}
! for name, val in pythoncom.__dict__.items():
if name[:3] == "VT_":
vt_map[val] = name
--- 124,128 ----
# Fill a map with VT_ datatypes, to give us better names:
vt_map = {}
! for name, val in pythoncom.__dict__.iteritems():
if name[:3] == "VT_":
vt_map[val] = name
***************
*** 206,210 ****
import getopt, traceback
tests = []
! for ob in globals().values():
if type(ob)==type(main) and ob.__doc__:
tests.append(ob)
--- 206,210 ----
import getopt, traceback
tests = []
! for ob in globals().itervalues():
if type(ob)==type(main) and ob.__doc__:
tests.append(ob)
|