[Python-checkins] python/dist/src/Lib codecs.py,1.32,1.33

lemburg at users.sourceforge.net lemburg at users.sourceforge.net
Thu Feb 26 10:22:19 EST 2004


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15772

Modified Files:
	codecs.py 
Log Message:
Ignore sizehint argument. Fixes SF #844561.



Index: codecs.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/codecs.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** codecs.py	2 Feb 2003 23:08:27 -0000	1.32
--- codecs.py	26 Feb 2004 15:22:17 -0000	1.33
***************
*** 304,315 ****
              method and are included in the list entries.
  
!             sizehint, if given, is passed as size argument to the
!             stream's .read() method.
  
          """
!         if sizehint is None:
!             data = self.stream.read()
!         else:
!             data = self.stream.read(sizehint)
          return self.decode(data, self.errors)[0].splitlines(1)
  
--- 304,312 ----
              method and are included in the list entries.
  
!             sizehint, if given, is ignored since there is no efficient
!             way to finding the true end-of-line.
  
          """
!         data = self.stream.read()
          return self.decode(data, self.errors)[0].splitlines(1)
  
***************
*** 489,496 ****
      def readlines(self, sizehint=None):
  
!         if sizehint is None:
!             data = self.reader.read()
!         else:
!             data = self.reader.read(sizehint)
          data, bytesencoded = self.encode(data, self.errors)
          return data.splitlines(1)
--- 486,490 ----
      def readlines(self, sizehint=None):
  
!         data = self.reader.read()
          data, bytesencoded = self.encode(data, self.errors)
          return data.splitlines(1)




More information about the Python-checkins mailing list