Op 2017-09-10, Chris Angelico schreef <ros...@gmail.com>:
> Want to make something iterable? Define __iter__. Want to make it
> async-iterable (with "async for")? Define __aiter__. It's a bit clunky
> if you want the same object to be iterable both ways, but I don't know
> of any real-world situations where that's the case.

Would we not eventually want a file object to deliver its lines
asynchronously (with non-blocking reads under the hood) if
iterated over with "async for", while preserving the current
blocking behavior in the "for" case?

Stephan
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to