Subclassing built-in classes
MonkeeSage
MonkeeSage at gmail.com
Thu Oct 5 08:38:08 EDT 2006
Steve Holden wrote:
> 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.
Ah! That makes sense. I guess the only way to do it would be to add an
extra bit to every object to indicate whether it was constructed
literally and then re-initialize the object after compilation if that
bit is set. For some reason I just don't think that's gonna happen. ;)
Thanks for taking the time to explain.
Regards,
Jordan
More information about the Python-list
mailing list