steve at holdenweb.com
Wed Dec 29 20:33:16 CET 2004
Mike Meyer wrote:
> Steve Holden <steve at holdenweb.com> writes:
>>Well, 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.
> By modifying the parsers grammer at runtime. After all, it's just a
> data structure that's internal to the compiler.
But the parser executes before the compiled program runs, was my 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?
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237 +1 800 494 3119
More information about the Python-list