mirror of
https://github.com/python/cpython.git
synced 2026-01-26 21:03:34 +00:00
This reverts commit e1c4ba928852eac0b0e0bded1c314e3e36975286.
This commit is contained in:
parent
c07ac3c86a
commit
3ebe3d7688
@ -1062,9 +1062,6 @@ class BufferedReader(_BufferedIOMixin):
|
||||
if chunk is None:
|
||||
return buf[pos:] or None
|
||||
else:
|
||||
# Avoid slice + copy if there is no data in buf
|
||||
if not buf:
|
||||
return chunk
|
||||
return buf[pos:] + chunk
|
||||
chunks = [buf[pos:]] # Strip the consumed bytes.
|
||||
current_size = 0
|
||||
|
||||
@ -1,2 +0,0 @@
|
||||
:mod:`!_pyio`: Remove an unnecessary copy when ``_pyio.BufferedReader.read()``
|
||||
is called to read all data from a file and has no data already in buffer.
|
||||
Loading…
x
Reference in New Issue
Block a user