[Python-Dev] Stackless Python

Phillip J. Eby pje at telecommunity.com
Wed Jun 2 14:04:43 EDT 2004


At 09:23 AM 6/2/04 -0700, Guido van Rossum wrote:

>Right.  That PEP better explain how one writes C code that calls into
>Python without involving the C stack as well!

I believe the outstanding proposal is that attempting a task switch from 
within Python code that was called by an extension will fail with an exception.

But, if you mean, "how do you write a new piece of C that calls the 
interpreter, such that it can allow task switching to take place from the 
invoked interpreter?", then that's a different question, which should 
definitely be answered in the PEP.

The problem I see is that *any* operation on a Python object potentially 
involves C calling Python, which seems to mean that the changes to the core 
interpreter would have to be quite widespread.  But maybe the PEP authors 
have a more clever way to deal with that than anything I've thought of.




More information about the Python-Dev mailing list