Yury Selivanov added the comment: Please test the attached patch.
> BTW, it's not only for compiled generators but also for normal Python > functions that construct Python generators internally and return them You're right, that's why I used "primarily" word in that comment ;) types.coroutine() is only used by asyncio.coroutine() so far, and returning generator objects from "factory" functions isn't a very common pattern in asyncio. ---------- Added file: http://bugs.python.org/file39551/types_coroutine.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24316> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com