[Python-Dev] towards a faster Python

Guido van Rossum guido@python.org
Mon, 09 Jun 2003 16:53:49 -0400


> Guido van Rossum wrote:
> 
> > I still would like to be able to say "if you add a module global that
> > corresponds to a built-in name used in the module, the module may
> > continue to use the built-in name".  As long as we can detect *most*
> > of the ways of inserting such module globals, the remaining ways could
> > be declared illegal without making them impossible.
> 
> I'd phrase this differently: Those cases just get a different semantics
> then they have now; the module-level name is ignored unless explicitly
> qualified. In the spirit of C, hiding builtins would cause "undefined 
> behaviour" or "implementation-defined behaviour", and not be "illegal".

I don't think the spirit of C applies here.  I want to be able to tell
anyone who does one of these things that their program is illegal (or
invalid, or some other pejorative term), not just undefined, and
certainly not implementation-defined.  Otherwise a future
implementation couldn't detect such illegal programs and reject them
at compile time or at least raise an exception at run-time.

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