Ivan Levkivskyi <levkivs...@gmail.com> added the comment:

A first simple idea that comes to my mind is special-case async 
generators/iterators in PyObject_GetIter to say something like:

TypeError: asynchronous iterable can't be used where an iterable is expected

If it is possible to detect that an async generator is resulting from a 
generator expression, then we can say:

TypeError: asynchronous generator expression can't be used as an iterable

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32113>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to