mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Issue #27243: Fix __aiter__ protocol
This commit is contained in:
parent
ebe95fdabb
commit
a6f6edbda8
13 changed files with 292 additions and 33 deletions
|
@ -689,3 +689,9 @@ class StreamReader:
|
|||
if val == b'':
|
||||
raise StopAsyncIteration
|
||||
return val
|
||||
|
||||
if compat.PY352:
|
||||
# In Python 3.5.2 and greater, __aiter__ should return
|
||||
# the asynchronous iterator directly.
|
||||
def __aiter__(self):
|
||||
return self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue