Re: define "generator" (glossary bug?)



>>> I believe the glossary
>>> http://wiki.python.org/moin/PythonGlossary
>>> is missing the definition for 'generator'
>>> and has used instead the definition for 'generator function',
>>> which term is missing from the glossary.
>>>
>>> Standard usage as I understand it is found here:
>>> http://docs.python.org/3.0/reference/simple_stmts.html#the-yield-statement

Note that the glossary page is on the wiki. Feel free to make corrections.

--
Skip Montanaro - skip@xxxxxxxxx - http://www.smontanaro.net/
America's vaunted "free press" notwithstanding, story ideas that expose
the unseemly side of actual or potential advertisers tend to fall by the
wayside. Not quite sure why. -- Jim Thornton
.



Relevant Pages

  • Re: Populating a dictionary, fast
    ... code, while correct in intent, does look a bit fishy (missing those ... By "missing those square brackets", what would be a list comprehension ... Enter 'python "generator expression"' into your favourite search ...
    (comp.lang.python)
  • About 1.8.7 Array#map! without a block
    ... with e.next to change the value, say, multiplying by 2 as on the first ... case and have a array on the end? ... - Why I get a Generator on "a" elements when I just call e.next? ... cause it's what I'm missing to use with next, ...
    (comp.lang.ruby)
  • RE: Simple Recursive Generator Question
    ... but one of the things you're missing is ... The generator saves you having to pass the "index" param recursively. ... > Changing yield to print, shows that the recursion works correctly. ...
    (comp.lang.python)
  • Re: Is there a better/simpler way to filter blank lines?
    ... I must be missing something: ... Using the surrounding parentheses creates a generator object, ... Downside is the increased memory usage and processing time as you dump ... xlines:" operation, it would be faster to use the generator. ...
    (comp.lang.python)