summaryrefslogtreecommitdiffstats
path: root/Lib/_pyio.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/_pyio.py')
-rw-r--r--Lib/_pyio.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/_pyio.py b/Lib/_pyio.py
index 163cf9d..7f247ff 100644
--- a/Lib/_pyio.py
+++ b/Lib/_pyio.py
@@ -638,10 +638,7 @@ class RawIOBase(IOBase):
def readall(self):
"""Read until EOF, using multiple read() call."""
res = bytearray()
- while True:
- data = self.read(DEFAULT_BUFFER_SIZE)
- if not data:
- break
+ while data := self.read(DEFAULT_BUFFER_SIZE):
res += data
if res:
return bytes(res)