Update of /cvsroot/pywin32/pywin32/com/win32comext/mapi
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1302/com/win32comext/mapi
Modified Files:
Tag: py3k
mapiutil.py
Log Message:
Almost all files in py3k branch are now in py3k syntax - but work remains
Index: mapiutil.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/mapi/mapiutil.py,v
retrieving revision 1.5.4.2
retrieving revision 1.5.4.3
diff -C2 -d -r1.5.4.2 -r1.5.4.3
*** mapiutil.py 26 Nov 2008 09:03:30 -0000 1.5.4.2
--- mapiutil.py 27 Nov 2008 04:58:41 -0000 1.5.4.3
***************
*** 83,87 ****
return None
if bRetList:
! return map( lambda(v): v[1], data )
else:
return data[0][1]
--- 83,87 ----
return None
if bRetList:
! return map( lambda v: v[1], data )
else:
return data[0][1]
***************
*** 94,98 ****
if make_tag_names:
hr, tags, array = obj.GetNamesFromIDs( (tag,) )
! if type(array[0][1])==type(u''):
name = array[0][1]
else:
--- 94,98 ----
if make_tag_names:
hr, tags, array = obj.GetNamesFromIDs( (tag,) )
! if type(array[0][1])==type(''):
name = array[0][1]
else:
***************
*** 106,111 ****
type(0.0): mapitags.PT_DOUBLE,
type(0): mapitags.PT_I4,
! type(''): mapitags.PT_STRING8,
! type(u''): mapitags.PT_UNICODE,
type(None): mapitags.PT_UNSPECIFIED,
# In Python 2.2.2, bool isn't a distinct type (type(1==1) is type(0)).
--- 106,111 ----
type(0.0): mapitags.PT_DOUBLE,
type(0): mapitags.PT_I4,
! type(''.encode('ascii')): mapitags.PT_STRING8, # str in py2x, bytes in 3x
! type(''): mapitags.PT_UNICODE, # XXX - fix better for py3k
type(None): mapitags.PT_UNSPECIFIED,
# In Python 2.2.2, bool isn't a distinct type (type(1==1) is type(0)).
***************
*** 159,163 ****
tagType = mapitags.PT_SYSTIME
else:
! raise ValueError("The type of object %s(%s) can not be written" % (`val`,type_val))
key = mapitags.PROP_TAG(tagType, mapitags.PROP_ID(newIds[newIdNo]))
newIdNo = newIdNo + 1
--- 159,163 ----
tagType = mapitags.PT_SYSTIME
else:
! raise ValueError("The type of object %s(%s) can not be written" % (repr(val),type_val))
key = mapitags.PROP_TAG(tagType, mapitags.PROP_ID(newIds[newIdNo]))
newIdNo = newIdNo + 1
|