New submission from Brett Cannon: It would be great if I could do something like:
if any(x for async x in aiter()): ... But as of right now, any() complains that "TypeError: 'async_generator' object is not iterable". I would assume that any() and all() could be updated to look for __aiter__() instead of just __iter__() and do the right thing in either case? Or am I missing something subtle here? ---------- components: Library (Lib) messages: 300224 nosy: brett.cannon, giampaolo.rodola, haypo, yselivanov priority: normal severity: normal status: open title: Make any() and all() work with async generators versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31195> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com