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 Mark.Shannon
Recipients Mark.Shannon, amaury.forgeotdarc, benjamin.peterson, ncoghlan, ron_adam
Date 2012-01-29.09:22:59
SpamBayes Score 4.440892e-16
Marked as misclassified No
Message-id <4F250FF2.2080007@hotpy.org>
In-reply-to <1327802425.89.0.202313759093.issue13897@psf.upfronthosting.co.za>
Content
Nick Coghlan wrote:
> Nick Coghlan <ncoghlan@gmail.com> added the comment:
> 
> The division of responsibilities between generator objects and the eval loop is currently a little messy. The eval loop deals almost entirely with frame objects and also handles swapping exception states around on behalf of generators, which is why the generator specific exception state currently lives on frame objects (i.e. to avoid the eval loop needing to know too much about the internal structure of generator objects).

In my patch the exception state does not need swapping at all, so the 
question of whose responsibility it is become mute.
Neither generator nor ceval need to do it.

> 
> Before generator related state can reasonably be moved out of the frame objects, those responsibilities should be divided more cleanly. Ron Adam has made an initially attempt at tackling that problem in issue 13607.
> 
> Once the responsibilities are divided appropriately, *then* we can look at the fields that ceval no longer touches and see if they should be moved somewhere else (whether that's directly into the generator struct or into a new struct referenced from the generator struct).

This patch is largely orthogonal to that proposed for issue 13607.
In fact the new CoState struct would be a better place to pass data 
between PyEval_EvalFrame() and gen_send(), rather than adding yet 
another field to the frame.
History
Date User Action Args
2012-01-29 09:23:00Mark.Shannonsetrecipients: + Mark.Shannon, amaury.forgeotdarc, ncoghlan, ron_adam, benjamin.peterson
2012-01-29 09:22:59Mark.Shannonlinkissue13897 messages
2012-01-29 09:22:59Mark.Shannoncreate