generator/coroutine terminology

Marko Rauhamaa marko at pacujo.net
Thu Mar 12 13:55:21 EDT 2015


Rustom Mody <rustompmody at gmail.com>:

> I guess we need
> 1. A clear ontology of the base concepts (which is a buzzword for
> nailed-down terminology)

According to the documentation, a function whose definition contains a
yield statement is a generator:

   Using a yield expression in a function’s body causes that function to
   be a generator.

   <URL: https://docs.python.org/3/reference/expressions.html#yield-exp
   ressions>

   generator
      A function which returns an iterator.

   <URL: https://docs.python.org/3/glossary.html#term-generator>

Apparently, what we have here is a discrepancy between the documentation
and the CPython implementation.

In a word, it's a bug (somewhere).


Marko



More information about the Python-list mailing list