[Python-checkins] python/dist/src/Lib StringIO.py,1.23,1.24

mwh@sourceforge.net mwh@sourceforge.net
2002年5月13日 02:42:18 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv32637/Lib
Modified Files:
	StringIO.py 
Log Message:
Make StringIO work in --disable-unicode builds...
Index: StringIO.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/StringIO.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** StringIO.py	10 May 2002 21:00:35 -0000	1.23
--- StringIO.py	13 May 2002 09:42:15 -0000	1.24
***************
*** 40,44 ****
 def __init__(self, buf = ''):
 # Force self.buf to be a string or unicode
! if not isinstance(buf, types.UnicodeType):
 buf = str(buf)
 self.buf = buf
--- 40,44 ----
 def __init__(self, buf = ''):
 # Force self.buf to be a string or unicode
! if not isinstance(buf, types.StringTypes):
 buf = str(buf)
 self.buf = buf
***************
*** 139,143 ****
 if not s: return
 # Force s to be a string or unicode
! if not isinstance(s, types.UnicodeType):
 s = str(s)
 if self.pos > self.len:
--- 139,143 ----
 if not s: return
 # Force s to be a string or unicode
! if not isinstance(s, types.StringTypes):
 s = str(s)
 if self.pos > self.len:

AltStyle によって変換されたページ (->オリジナル) /