Yury Selivanov added the comment:

> What problem does this solve?

Only avoiding confusion, because coroutines now have a separate type, lack 
__iter__, and thus are quite different (on the surface) from generators. The 
fact that 'coro.send(..)' raises StopIteration (when coroutines aren't 
iterable), and that 'coro.close()' raises GeneratorExit might be confusing and 
non-obvious to some users.

FWIW I created this ticket mostly as a reminder for myself to have some 
discussion on this topic in the future, when 3.5 is released and we have some 
initial feedback on PEP 492 ideas.

----------

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

Reply via email to