| Store | Cart

[Python-Dev] [IronPython] Exception for setting attributes of built-in type

From: Guido van Rossum <gui...@python.org>
Mon, 15 Jun 2009 10:10:59 -0700
On Mon, Jun 15, 2009 at 9:10 AM, Michael Foord<fuzzyman at voidspace.org.uk> wrote:
> Dino Viehland wrote:>> Guido wrote:>>> I should add that this policy is also forced somewhat by the existence>>> of the "multiple interpreters in one address space" feature, which is>>> used e.g. by mod_python. This feature attempts to provide isolation>>> between interpreters to the point that each one can have a completely>>> different set of modules loaded and can be working on a totally>>> different application. The implementation of CPython shares built-in>>> types between multiple interpreters (and it wouldn't be easy to change>>> this); if you were able to modify a built-in type from one>>> interpreter, all other interpreters would see that same modification.>> IronPython is in the exact same boat here - we share built-in types>> Across multiple Python engines as well.> And indeed it is needed - if you are working with multiple interpreters> (engines in IronPython) you don't want isinstance(something, dict) to fail> because it is a dictionary from a different interpreter...

Ah, but that suggests you have sharing between different interpreters.
If you're doing that, perhaps you shouldn't be using multiple
interpreters, but instead multiple threads?

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)

Recent Messages in this Thread
Seo Sanghyeon Jun 14, 2009 07:09 pm
Terry Reedy Jun 14, 2009 10:40 pm
MRAB Jun 14, 2009 10:42 pm
Guido van Rossum Jun 14, 2009 11:19 pm
Nick Coghlan Jun 15, 2009 11:27 am
Benjamin Peterson Jun 15, 2009 07:09 pm
Nick Coghlan Jun 15, 2009 09:31 pm
Guido van Rossum Jun 15, 2009 02:48 pm
Dino Viehland Jun 15, 2009 03:54 pm
Michael Foord Jun 15, 2009 04:10 pm
Guido van Rossum Jun 15, 2009 05:10 pm
Michael Foord Jun 15, 2009 05:20 pm
Dino Viehland Jul 02, 2009 11:45 pm
Messages in this thread