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 chris.jerdonek
Recipients chris.jerdonek, docs@python, ncoghlan, terry.reedy
Date 2012-07-28.07:26:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I created issue 15476 to add "code object" to the glossary.

> Generator functions must have a special __call__ method that simply creates and returns a generator instance with the code object attached (instead of executing the code).

Just to be sure, is this the same as what you were saying in your previous comment?

"The gf does this# by setting the gi_code attribute of instances to the code object compiled from its body. (Or perhaps it calls the generator class with its code object as parameter. In any case, this is what the special gf.__call__ method does instead of executing its code attribute."

Since you're not sure whether the gi_code attribute is meant to be public, it may be best not to mention it explicitly in the docs.  This is consistent with what I have done in the latest patch.  Thanks in advance for reviewing the update.
Date User Action Args
2012-07-28 07:26:28chris.jerdoneksetrecipients: + chris.jerdonek, terry.reedy, ncoghlan, docs@python
2012-07-28 07:26:28chris.jerdoneksetmessageid: <>
2012-07-28 07:26:28chris.jerdoneklinkissue15457 messages
2012-07-28 07:26:27chris.jerdonekcreate