diff options
author | Raymond Hettinger <python@rcn.com> | 2015-05-09 05:07:23 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2015-05-09 05:07:23 (GMT) |
commit | bd60e8dece89440ebdc80a19b2217d5ba2515124 (patch) | |
tree | 97cf2f7e3802aede1de63eb304cefcf55791077e /Doc | |
parent | dae2ef1cfad60b149370b4012aa48bea2dd27445 (diff) | |
download | cpython-bd60e8dece89440ebdc80a19b2217d5ba2515124.zip cpython-bd60e8dece89440ebdc80a19b2217d5ba2515124.tar.gz cpython-bd60e8dece89440ebdc80a19b2217d5ba2515124.tar.bz2 |
Issue #24018: Add a collections.Generator abstract base class.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/collections.abc.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/library/collections.abc.rst b/Doc/library/collections.abc.rst index 99c4311..8a71259 100644 --- a/Doc/library/collections.abc.rst +++ b/Doc/library/collections.abc.rst @@ -40,6 +40,7 @@ ABC Inherits from Abstract Methods Mixin :class:`Hashable` ``__hash__`` :class:`Iterable` ``__iter__`` :class:`Iterator` :class:`Iterable` ``__next__`` ``__iter__`` +:class:`Generator` :class:`Iterator` ``send``, ``throw`` ``close``, ``__iter__``, ``__next__`` :class:`Sized` ``__len__`` :class:`Callable` ``__call__`` @@ -102,6 +103,15 @@ ABC Inherits from Abstract Methods Mixin :meth:`~iterator.__next__` methods. See also the definition of :term:`iterator`. +.. class:: Generator + + ABC for generator classes that implement the protocol defined in + :pep:`342` that extends iterators with the :meth:`~generator.send`, + :meth:`~generator.throw` and :meth:`~generator.close` methods. + See also the definition of :term:`generator`. + + .. versionadded:: 3.5 + .. class:: Sequence MutableSequence |