Python Rocks!

Tim Peters tim_one at email.msn.com
Fri Jan 21 04:38:12 EST 2000


[Tim]
> Programs-writing-programs is a twist of mind conspicuously
> absent in the Python world.

Note that, in context, this meant Python programs transforming Python
programs into other Python programs.  The equivalent is quite common in
Lisp, but may be more common in Fortran than Python!  That whole class of
techniques just never caught on here; most Pythoneers take pride in finding
ways to avoid using even "exec".

[François Pinard]
> ...
> Isn't there a need for compiling grammars into fast scanners
> and parsers, a bit like Flex and Bison do for C people?

Yes, but that's really a different topic.  The Python world has no good
approach to that now, paying attention to the "fast" part, and where "good"
means "enough like Flex and Bison that you don't feel you've been stranded
on some strange alien planet" <wink>.

> To be happy, I presume one would have to write small amounts
> of Python code for each "action".  Or maybe just provide the
> name of a function to call.  Yet, the result has to be Python.
>
> Or are you suggesting that such tools should directly
> generate byte-code?

Hmm -- while I don't *believe* I was suggesting anything, I'm *sure* I
wasn't suggesting that <wink>.

better-to-write-python-wrappers-for-lex-&-bison-ly y'rs  - tim






More information about the Python-list mailing list