Skip to content
Myr

adding decoding requirement for Python 3

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Nate Prewitt · committed by Nate Prewitt · parent 70f1f8e · Browse files · 1 file+2 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−1 removed

  • other:+2 added−1 removed

1 file+2 added−1 removed

modified:docs/user/advanced.rst+2 added-1 removed
494 unmodified lines
495 for line in r.iter_lines():496497 # filter out keep-alive new lines498 if line:499 decoded_line = line.decode('utf-8')499 print(json.loads(line))500 print(json.loads(decoded_line))501502.. warning::503504 :meth:`~requests.Response.iter_lines()` is not reentrant safe.
471 unmodified lines