[Python-Dev] Re: Dynamic nested scopes

M.-A. Lemburg mal@lemburg.com
Fri, 03 Nov 2000 21:14:17 +0100


[Making builtins static...]

What about the idea to have the compiler make the decision
whether a global symbol may be considered static based on a 
dictionary ?

In non-optimizing mode this dictionary would be empty, with -O
it would include all builtins which should never be overloaded
and with -OO even ones which can be overloaded such as open()
in addition to some standard modules which are known to only
contain static symbols.

Perhaps this needs some additional help of the "define" statement
we planned as dynamic compiler interface ?! ...

define static_symbols = *            # all globals in this module
define static_symbols = func1, func2 # only these two
etc.

-- 
Marc-Andre Lemburg
______________________________________________________________________
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/