classification
Title: Generator __name__ and better repr()
Type: enhancement Stage:
Components: Interpreter Core Versions: Python 3.0, Python 2.6
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: belopolsky, georg.brandl, gvanrossum, svncodereview
Priority: normal Keywords: patch

Created on 2008-05-15 14:24 by georg.brandl, last changed 2008-05-16 09:35 by georg.brandl. This issue is now closed.

Files
File name Uploaded Description Edit
gen-name.diff georg.brandl, 2008-05-15 14:24
Messages (6)
msg66859 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-05-15 14:24
As discussed on python-ideas:
http://mail.python.org/pipermail/python-ideas/2008-May/001570.html
msg66860 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2008-05-15 14:34
http://codereview.appspot.com/1046
msg66861 - (view) Author: (svncodereview) Date: 2008-05-15 14:36
Dear report,

New code review comments by GvR have been published.
Please go to http://codereview.appspot.com/1046 to read them.

Message:
Looks good to me.

Details:

Issue Description:
http://bugs.python.org/issue2863

Sincerely,

  Your friendly code review daemon (http://codereview.appspot.com/).
msg66865 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-05-15 15:08
Okay, committed as r63320.
msg66877 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2008-05-15 19:25
Any reason why generator object repr is formed differently from
function and code?

>>> def f(): yield 1
...
>>> f()
<f generator object at 0x2a98530560>
>>> f
<function f at 0x2a985245a0>
>>> f.__code__
<code object f at 0x2a956bc040, file "<stdin>", line 1>
msg66926 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-05-16 09:35
Changed in r63364.
History
Date User Action Args
2008-05-16 09:35:02georg.brandlsetkeywords: patch, patch
messages: + msg66926
2008-05-15 19:25:20belopolskysetnosy: + belopolsky
messages: + msg66877
2008-05-15 15:08:59georg.brandlsetstatus: open -> closed
resolution: accepted
messages: + msg66865
keywords: patch, patch
2008-05-15 14:36:40svncodereviewsetnosy: + svncodereview
messages: + msg66861
2008-05-15 14:34:41gvanrossumsetkeywords: patch, patch
messages: + msg66860
2008-05-15 14:24:48georg.brandlcreate