M
Mike Meyer
Steve Holden said:But the parser executes before the compiled program runs, was myMike said:[...]By modifying the parsers grammer at runtime. After all, it's just aWell, perhaps you can explain how a change that's made at run time
(calling the decorator) can affect the parser's compile time behavior,
then. At the moment, IIRC, the only way Python code can affect the
parser's behavior is in the __future__ module, which must be imported
at the very head of a module.
data structure that's internal to the compiler.
point. What strange mixture of compilation and interpretation are you
going to use so the parser actually understands that ".." (say) is an
operator before the operator definition has been executed?
Ok, current decorators won't do. Clearly, any support for adding infix
operators is going to require compiler support.
<mike