[docs] [issue34518] Documentation for coroutine objects

Hrvoje Nikšić report at bugs.python.org
Mon Aug 27 09:22:24 EDT 2018

Hrvoje Nikšić <hniksic at gmail.com> added the comment:

That's exactly it, thanks! I have no idea how I missed it, despite looking (I thought) carefully.

But yes, they should be linked from https://docs.python.org/3/library/stdtypes.html . Just as currently there is https://docs.python.org/3/library/stdtypes.html#generator-types that links to https://docs.python.org/3/reference/expressions.html#yieldexpr , there could be a #coroutine-types that links to https://docs.python.org/3/reference/datamodel.html#coroutine-objects

Another place to link is https://docs.python.org/3/glossary.html#term-coroutine - it currently does link to the reference, but only to the "async def" syntax.

Since https://docs.python.org/3/reference/compound_stmts.html#async-def is linked from many places, it might make sense to mention that *calling* a coroutine immediately returns a coroutine object, with a link to https://docs.python.org/3/reference/datamodel.html#coroutine-objects


Python tracker <report at bugs.python.org>

More information about the docs mailing list