Subclassing built-in classes

Steve Holden steve at holdenweb.com
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 
can't.

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

When are literals interpreted? During translation into bytecode.

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd          http://www.holdenweb.com
Skype: holdenweb       http://holdenweb.blogspot.com
Recent Ramblings     http://del.icio.us/steve.holden




More information about the Python-list mailing list