[pywin32-checkins] pywin32/com/win32com/client genpy.py,1.66,1.67
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Roger U. <ru...@us...> - 2010-06-03 18:40:31
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv12476 Modified Files: genpy.py Log Message: Fix __str__ in py3k for objects with a default property Index: genpy.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/genpy.py,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** genpy.py 27 Mar 2009 12:34:43 -0000 1.66 --- genpy.py 3 Jun 2010 18:40:23 -0000 1.67 *************** *** 491,495 **** print >> stream, "\t\t\treturn repr(self)" print >> stream, "\tdef __str__(self, *args):" ! print >> stream, "\t\treturn str(self.__unicode__(*args))" print >> stream, "\tdef __int__(self, *args):" print >> stream, "\t\treturn int(self.__call__(*args))" --- 491,498 ---- print >> stream, "\t\t\treturn repr(self)" print >> stream, "\tdef __str__(self, *args):" ! if sys.version_info > (3,0): ! print >> stream, "\t\treturn str(self.__call__(*args))" ! else: ! print >> stream, "\t\treturn str(self.__unicode__(*args))" print >> stream, "\tdef __int__(self, *args):" print >> stream, "\t\treturn int(self.__call__(*args))" |