File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -303,14 +303,11 @@ def readlines(self, sizehint=None):
303303 Line breaks are implemented using the codec's decoder
304304 method and are included in the list entries.
305305
306- sizehint, if given, is passed as size argument to the
307- stream's .read() method .
306+ sizehint, if given, is ignored since there is no efficient
307+ way to finding the true end-of-line .
308308
309309 """
310- if sizehint is None :
311- data = self .stream .read ()
312- else :
313- data = self .stream .read (sizehint )
310+ data = self .stream .read ()
314311 return self .decode (data , self .errors )[0 ].splitlines (1 )
315312
316313 def reset (self ):
@@ -488,10 +485,7 @@ def readline(self, size=None):
488485
489486 def readlines (self , sizehint = None ):
490487
491- if sizehint is None :
492- data = self .reader .read ()
493- else :
494- data = self .reader .read (sizehint )
488+ data = self .reader .read ()
495489 data , bytesencoded = self .encode (data , self .errors )
496490 return data .splitlines (1 )
497491
You can’t perform that action at this time.
0 commit comments