]> granicus.if.org Git - python/commitdiff
Issue #24400: Mention that __instancecheck__ is used in abc.Awaitable and Coroutine
authorYury Selivanov <yselivanov@sprymix.com>
Wed, 1 Jul 2015 16:49:00 +0000 (12:49 -0400)
committerYury Selivanov <yselivanov@sprymix.com>
Wed, 1 Jul 2015 16:49:00 +0000 (12:49 -0400)
Doc/conf.py
Doc/library/collections.abc.rst

index 28dd80f8590f49bd8a11389559e68fc4e4d6ab81..20086a9c18a2c585fe12d5abfe354e09355523e6 100644 (file)
@@ -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}
 
index 0653d4e35c864b6c0bd5d012196258f4d7a20495..dc2704ee5bb3330f02b2d59cf9ae6de445c6a043 100644 (file)
@@ -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