diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2015-07-01 16:49:00 (GMT) |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-07-01 16:49:00 (GMT) |
commit | cc1d0287b5c775ff35dc6af25009646e034a0a75 (patch) | |
tree | 1c05a31d5e52c5edcf93ce699fc7d41659226337 /Doc | |
parent | f27015255f899d3c36fb3c096fe1faa7b123d05b (diff) | |
download | cpython-cc1d0287b5c775ff35dc6af25009646e034a0a75.zip cpython-cc1d0287b5c775ff35dc6af25009646e034a0a75.tar.gz cpython-cc1d0287b5c775ff35dc6af25009646e034a0a75.tar.bz2 |
Issue #24400: Mention that __instancecheck__ is used in abc.Awaitable and Coroutine
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/conf.py | 2 | ||||
-rw-r--r-- | Doc/library/collections.abc.rst | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/Doc/conf.py b/Doc/conf.py index 28dd80f..20086a9 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -44,7 +44,7 @@ exclude_patterns = ['venv/*'] # ----------------------- # Use our custom theme. -html_theme = 'pydoctheme' +html_theme = 'classic' html_theme_path = ['tools'] html_theme_options = {'collapsiblesidebar': True} diff --git a/Doc/library/collections.abc.rst b/Doc/library/collections.abc.rst index 0653d4e..dc2704e 100644 --- a/Doc/library/collections.abc.rst +++ b/Doc/library/collections.abc.rst @@ -161,6 +161,12 @@ ABC Inherits from Abstract Methods Mixin :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 @@ ABC Inherits from Abstract Methods Mixin :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 |