[Python-Dev] doc for new restricted execution design for Python

Brett Cannon brett at python.org
Thu Jul 6 19:15:32 CEST 2006


On 7/6/06, Michael Chermside <mcherm at mcherm.com> wrote:
>
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-dev/attachments/20060706/c1f33aaf/attachment.htm 


More information about the Python-Dev mailing list