[issue24995] better exception message when an unsupported object is passed to `async for` (pep 492)

Yury Selivanov report at bugs.python.org
Fri Sep 4 00:05:32 CEST 2015


Yury Selivanov added the comment:

I saw this reddit thread: https://www.reddit.com/r/Python/comments/3ewnwq/async_function_as_generator_for_async_for/ where people are struggling with understanding how 'async for' works.  Which led me to check what error messages we raise when we pass a wrong object to it.  Turns out the message is fine, but different from what we raise on iter(1) etc.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24995>
_______________________________________


More information about the Python-bugs-list mailing list