On 7/6/06, Michael Chermside <[EMAIL PROTECTED]> wrote:
C extension module attributes will share those objects across interpreters. Because the initializing function is not called again on extension modules when imported into another interpreter anything that is exposed by the module is the same across all interpreters.
-Brett
I wrote:
> I would still rather not spread FUD.
Brett Cannon responds:
> I don't consider it FUD. Armin in an email said that he thought it
> was a losing battle to try to hide 'file' from an interpreter. That
> is what I am worried about, period. Everythign else can be
> protected through resource hiding.
I never intended to say that "we can't hide 'file' from the user"
was FUD. Only objects crossing between interpreters. And it *might*
not be FUD, but so far I haven't heard anyone say that they thought
objects *could* cross between interpreters. I think your proposal
would read better with a categorical statement that objects cannot
cross between interpreters (right along with your categorical
statement that Python code cannot directly access dangerous resources
without help from the C level), so I present the following challenge:
can anyone think of a way that an object could "cross" interpreters?
For instance, are certain basic objects shared (str and int for
instance) and objects could be passed between interpreters by
attaching them as attributes of these core objects? I just don't
know enough about multiple interpreters to be sure -- but somehow I
thought they had separate object pools.
C extension module attributes will share those objects across interpreters. Because the initializing function is not called again on extension modules when imported into another interpreter anything that is exposed by the module is the same across all interpreters.
-Brett
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com