We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37c2220 commit e1d455fCopy full SHA for e1d455f
1 file changed
Doc/library/http.client.rst
@@ -516,10 +516,7 @@ Here is an example session that uses the ``GET`` method::
516
>>> # The following example demonstrates reading data in chunks.
517
>>> conn.request("GET", "/")
518
>>> r1 = conn.getresponse()
519
- >>> while True:
520
- ... chunk = r1.read(200) # 200 bytes
521
- ... if not chunk:
522
- ... break
+ >>> while chunk := r1.read(200):
523
... print(repr(chunk))
524
b'<!doctype html>\n<!--[if"...
525
...
0 commit comments