This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jjposner
Recipients georg.brandl, jjposner
Date 2010-04-02.19:16:36
SpamBayes Score 5.847561e-07
Marked as misclassified No
Message-id <1270235799.09.0.539614084701.issue8012@psf.upfronthosting.co.za>
In-reply-to
Content
Georg, your change (r79587) makes this the main definition:

  generator
      A function which returns an iterator.
  
I'm concerned that this definition does not fit well with the occurrence of "generator object" in the following:

Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> obj1 = (x for x in [1,2])
>>> def gfunc():
...     count = 0
...     while True:
...             count += 1
...             yield count
...
>>> obj2 = gfunc()
>>> obj1
<generator object <genexpr> at 0x00CC6378>
>>> obj2
<generator object gfunc at 0x00CC6328>
>>>


My patch attempted to make "generator" be the same as "generator object" in the above.
History
Date User Action Args
2010-04-02 19:16:39jjposnersetrecipients: + jjposner, georg.brandl
2010-04-02 19:16:39jjposnersetmessageid: <1270235799.09.0.539614084701.issue8012@psf.upfronthosting.co.za>
2010-04-02 19:16:36jjposnerlinkissue8012 messages
2010-04-02 19:16:36jjposnercreate