Stackless Python, eventual merge?

Michael Schneider michaels at one.net
Thu Sep 19 14:45:16 CEST 2002


If stackless makes it into the core.  Couldn't the "dangerious modules" 
check if the
current program is running in stackless mode.  

If stackless mode + dangerious module => exception



ex: (not the right syntax, just the symantics)


#################### start of my dangerNonStacklessModule.py

require NoStackless

import sys

#############################################################






Martin v. Loewis wrote:

>Greg Ewing <see_reply_address at something.invalid> writes:
>
>>So, the only way to find out whether a particular
>>extension is safe to use in Stackless is to try
>>it. 
>>
>
>That is not true. It is more reliable to inspect the source code.
>
>In general, it is very easy to do so: if there are no callbacks to
>Python, the module is stackless-safe.
>
>>That's why I say that I would be nervous about
>>using Stackless. Not to say that would stop me
>>from using it, but I'd feel nervous while I was
>>doing it! :-)
>>
>
>That is perfectly fine with me. The question is whether incorporation
>of Stackless Python in the core distribution would already make you
>nervous. I can see no rational reason for that.
>
>>Yes, I understand that, and I acknowledge that it
>>won't cause any harm to have Stackless in the core
>>if the Stackless stuff is switched off by default.
>>
>
>It is better than that: it does not need to be "switched off". Even if
>switched on (at build time), it won't start copying slices of the
>stack. An application actively has to import one of the modules, and
>to call a function in those modules, before you need to get nervous.
>
>Regards,
>Martin
>




More information about the Python-list mailing list