[docs] [issue15457] consistent treatment of generator terminology

Chris Jerdonek report at bugs.python.org
Sat Jul 28 03:45:04 CEST 2012

Chris Jerdonek <chris.jerdonek at gmail.com> added the comment:

Attaching updated patch incorporating feedback.

It would be nice to have a good term for "the generator function code object associated with a generator" to distinguish it from the original generator function as you point out.

There are many places in the docs where this distinction is blurred, for example throughout the subsection describing generator methods:

"generator.__next__(): Starts the execution of a generator function or resumes it at the last executed yield expression..."


By the way, I think it would be a good idea to add "code object" to the glossary as it is not currently listed.  In particular, the entry could link to the section of the docs that discuss code objects in more detail:

specifically: http://docs.python.org/dev/reference/datamodel.html#index-52

Added file: http://bugs.python.org/file26552/issue-15457-2.patch

Python tracker <report at bugs.python.org>

More information about the docs mailing list