mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
This reverts commit e1c4ba9288
.
This commit is contained in:
parent
c07ac3c86a
commit
3ebe3d7688
2 changed files with 0 additions and 5 deletions
|
@ -1062,9 +1062,6 @@ class BufferedReader(_BufferedIOMixin):
|
||||||
if chunk is None:
|
if chunk is None:
|
||||||
return buf[pos:] or None
|
return buf[pos:] or None
|
||||||
else:
|
else:
|
||||||
# Avoid slice + copy if there is no data in buf
|
|
||||||
if not buf:
|
|
||||||
return chunk
|
|
||||||
return buf[pos:] + chunk
|
return buf[pos:] + chunk
|
||||||
chunks = [buf[pos:]] # Strip the consumed bytes.
|
chunks = [buf[pos:]] # Strip the consumed bytes.
|
||||||
current_size = 0
|
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…
Add table
Add a link
Reference in a new issue