| Store | Cart

[Python-Dev] Accessing globals without dict lookup

From: Guido van Rossum <gui...@python.org>
Mon, 11 Feb 2002 09:31:32 -0500
> Just a few quick questions before go back into lurcking mode:

Note that I've moved my design to a new PEP, PEP 280.  Tim has added
his approach there too.  Please read it!!!

> Will it still be possible to:> a) install new builtins in the __builtin__ namespace and have them>    available in all already loaded modules right away ?> b) override builtins (e.g. open()) with my own copies >    (e.g. to increase security) in a way that makes these new>    copies override the previous ones in all modules ?

Yes, this is the whole point of this design.  In the original
approach, when LOAD_GLOBAL_CELL finds a NULL in the second cell, it
should go back to see if the __builtins__ dict has been modified (the
pseudo code doesn't have this yet).  Tim's alternative also takes care
of this.

> Also, how does the new scheme get along with the restricted > execution model ?

Yes, again.

> (I have a feeling that this model needs some auditing since so many> new ways of accessing variables and attributes were introduced since> the days of 1.5.2)

You may be right.

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

Recent Messages in this Thread
M.-A. Lemburg Feb 11, 2002 11:12 am
Guido van Rossum Feb 11, 2002 02:31 pm
M.-A. Lemburg Feb 11, 2002 03:41 pm
Tim Peters Feb 11, 2002 09:27 am
Messages in this thread