mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
bpo-45975: Simplify some while-loops with walrus operator (GH-29347)
This commit is contained in:
parent
25bc115df9
commit
024ac542d7
28 changed files with 41 additions and 153 deletions
|
@ -1339,10 +1339,7 @@ class Transport:
|
|||
|
||||
p, u = self.getparser()
|
||||
|
||||
while 1:
|
||||
data = stream.read(1024)
|
||||
if not data:
|
||||
break
|
||||
while data := stream.read(1024):
|
||||
if self.verbose:
|
||||
print("body:", repr(data))
|
||||
p.feed(data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue