On 4/22/06, Nick Coghlan <[EMAIL PROTECTED]> wrote:
> No matter what, permitting these kinds of hooks is going to require
> alterations to the process of compiling the AST to the bytecode - and
> subclassing is an excellent way of allowing some aspects of an implementation
> to be overridden while leaving other aspects alone.

Oops, I have to concur.

I was thinking that it could all be done later, at run-time. That
makes sense for things like [...] and {...} but doesn't really work
for floating point or even string literals -- you can't afford the
overhead of calling a default hook for each literal at run-time, and
passing the default value to the hook doesn't work in the case of
floats or strings.

Unfortunately a compile-time hook is much more painful to add to the
language because it means adding new syntax just to specify the hooks.
:-(

--
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to