changeset: 96746:b2a3baa1c2b0 branch: 3.5 parent: 96744:a9d38701536d user: Yury Selivanov date: Wed Jul 01 12:49:00 2015 -0400 files: Doc/conf.py Doc/library/collections.abc.rst description: Issue #24400: Mention that __instancecheck__ is used in abc.Awaitable and Coroutine diff -r a9d38701536d -r b2a3baa1c2b0 Doc/conf.py --- a/Doc/conf.py Wed Jul 01 12:29:55 2015 -0400 +++ b/Doc/conf.py Wed Jul 01 12:49:00 2015 -0400 @@ -44,7 +44,7 @@ # ----------------------- # Use our custom theme. -html_theme = 'pydoctheme' +html_theme = 'classic' html_theme_path = ['tools'] html_theme_options = {'collapsiblesidebar': True} diff -r a9d38701536d -r b2a3baa1c2b0 Doc/library/collections.abc.rst --- a/Doc/library/collections.abc.rst Wed Jul 01 12:29:55 2015 -0400 +++ b/Doc/library/collections.abc.rst Wed Jul 01 12:49:00 2015 -0400 @@ -161,6 +161,12 @@ :term:`Coroutine` objects and instances of the :class:`~collections.abc.Coroutine` ABC are all instances of this ABC. + .. note:: + In CPython, generator-based coroutines are *awaitables*, even though + they do not have an :meth:`__await__` method. This ABC + implements an :meth:`~class.__instancecheck__` method to make them + instances of itself. + .. versionadded:: 3.5 .. class:: Coroutine @@ -172,6 +178,12 @@ :meth:`__await__`. All :class:`Coroutine` instances are also instances of :class:`Awaitable`. See also the definition of :term:`coroutine`. + .. note:: + In CPython, generator-based coroutines are *awaitables* and *coroutines*, + even though they do not have an :meth:`__await__` method. This ABC + implements an :meth:`~class.__instancecheck__` method to make them + instances of itself. + .. versionadded:: 3.5 .. class:: AsyncIterable