[issue8012] Revise generator-related Glossary entries
Georg Brandl ge...@python.org added the comment: I think this patch is not correct: a generator really is the same as generator function. Both generators and genexps return an iterator; I've fixed that in r79587. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8012 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8012] Revise generator-related Glossary entries
John Posner jjpos...@optimum.net added the comment: 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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8012 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8012] Revise generator-related Glossary entries
John Posner jjpos...@optimum.net added the comment: Fair enough, Georg. Case closed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8012 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com