Subclassing built-in classes

Steve Holden steve at
Thu Oct 5 15:52:02 CEST 2006

Maric Michaud wrote:
> Le jeudi 05 octobre 2006 14:20, Steve Holden a écrit :
>>Unfortunately the literals are interpreted during bytecode generation,
>>before the compiled program is available, and your modifications to
>>__builtns__ haven't been made, so the answer is "no", I'm afraid.
> But what prevents to interpret literals as a call to __builtins__ objects and 
> functions ? optimization ? what else ?
How can you modify __builtins__ before your program starts running? You 

What does the interpreter have to do before the program runs? Translate 
it into bytecode.

When are literals interpreted? During translation into bytecode.

Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd
Skype: holdenweb
Recent Ramblings

More information about the Python-list mailing list