[Python-Dev] Eliminating f_tstate

Delaney, Timothy (Tim) tdelaney at avaya.com
Mon Jan 22 22:36:03 CET 2007


"Martin v. Löwis" wrote:

> For Python 2.5, for compatibility, it probably has to remain
> where it is, and only PyTraceBack_Here should stop using it.
> As a consequence, a generator .send() makes exceptions
> occur in the current thread, not in the thread where the
> generator was created.
> 
> What do you think?

That's the behaviour I would expect. There is nothing I can find in either the Python docs nor PEP 342 to suggest that interactions with generators happen on anything except the current thread. Anything else IMO is a bug, and should be a candidate for 2.5.1.

Tim Delaney


More information about the Python-Dev mailing list