commit | a6f6edbda8648698289a8ee7abef6a35c924151b | [log] [tgz] |
---|---|---|
author | Yury Selivanov <yury@magic.io> | Thu Jun 09 15:08:31 2016 -0400 |
committer | Yury Selivanov <yury@magic.io> | Thu Jun 09 15:08:31 2016 -0400 |
tree | 9eb77fd4f552bcabfb46a3938d0ded084e7709f9 | |
parent | ebe95fdabb42b02ff7eecab6bc9637cf5ccf1d2c [diff] [blame] |
Issue #27243: Fix __aiter__ protocol
diff --git a/Lib/asyncio/streams.py b/Lib/asyncio/streams.py index 6f465af..c88a87c 100644 --- a/Lib/asyncio/streams.py +++ b/Lib/asyncio/streams.py
@@ -689,3 +689,9 @@ 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