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 <1343460388.87.0.35358990965.issue15457@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
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: <1343460388.87.0.35358990965.issue15457@psf.upfronthosting.co.za>
2012-07-28 07:26:28chris.jerdoneklinkissue15457 messages
2012-07-28 07:26:27chris.jerdonekcreate