Tinkering with builtins (was: Re: True, False, None)

Michele Simionato mis6 at pitt.edu
Tue Nov 11 09:03:02 CET 2003


"John Roth" <newsgroups at jhrothjr.com> wrote in message news:
> There's a movement
> to make just about everything in the built-in scope immutable and
> not rebindable at any lower scope for performance reasons. 

I am a bit worried by this movement. While I have found no reason to twick
the builtins in production code, I have found specific situations where
the ability of tinkering with the builtins is extremely convenient. 
Typically this happens in the debugging phase. For instance I have used 
tricks such as modifying the `object` class to induce tracing capabilities
on all my classes, withouth touching my source code.

So, I would be happy with the following:

1. by default builtins cannot be changed, resulting in a performance
   benefit;

2. nevertheless, it is possible to use a command line switch to revert 
   to the current behavior.

If the project is to kill option 2, then I would be unhappy :-(


                Michele




More information about the Python-list mailing list