per interpreter storage for C extensions

"Martin v. Löwis" martin at v.loewis.de
Sat Dec 30 09:43:06 EST 2006


Robin Becker schrieb:
> What is worrying is that in the extension init we're creating an
> exception and version string etc and holding a pointer to them in C; is
> it safe to use the same exception in different interpeters? 

It is safe as long as the base exception classes are also shared across
interpreters, otherwise, the hierarchical exception matching will break.
The builtin exceptions are all "global" (i.e. shared across
interpreters) (I believe).

In any case, it looks like that the "multiple interpreters" feature of
Python is just broken.

Regards,
Martin



More information about the Python-list mailing list