A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-June/065519.html below:

[Python-Dev] feature request: inspect.isgenerator

[Python-Dev] feature request: inspect.isgenerator [Python-Dev] feature request: inspect.isgeneratorTerry Reedy tjreedy at udel.edu
Thu Jun 1 17:57:15 CEST 2006
"Michele Simionato" <michele.simionato at gmail.com> wrote in message 
news:loom.20060601T145807-833 at post.gmane.org...

> Yep, this is the crux. types.GeneratorType refers to generator objects,
> which in an improper sense are "instances" of a "generator function".
> I.e.
>
> def g(): yield 1 # this is a generator
>
> go = g() # this is a generator object

That terminology does not work.  For every other type, an x is an x object 
and vice versa.  I think most of us call functions which return generators 
a generator function when the distinction needs to be made.  A generator is 
a type in the conceptual class 'iterator'.

Terry Jan Reedy



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4