[Python-Dev] Introducing new operators for matrix computation

Jeremy Hylton jeremy@beopen.com
Fri, 14 Jul 2000 14:49:24 -0400 (EDT)

>>>>> "MZ" == Moshe Zadka <moshez@math.huji.ac.il> writes:

  MZ> On Fri, 14 Jul 2000, Jeremy Hylton wrote:
  AMK> So, rather than add a whole bunch of new operators to the core,
  AMK> I'd first want to see the alternative syntax implemented
  AMK> through a hacked parser and *in use by a significant
  AMK> community*, and then we can consider what bits from it to add
  AMK> to the core.
  >>  This seems like a reasonable approach to me.  You basically
  >> build a frontend that compiles the Python+extensions into
  >> standard Python bytecode.

  MZ> Wouldn't it be better to compile the Python+extensions into
  MZ> standard Python? Something that would work at the parse tree
  MZ> level?

That's a lot of work!  I'm not aware of any tools that generate Python
source code from a parser tree.  The Python bytecode is so high-level
that it is pretty easy to understand.

The parse tree generated by Python's builtin parser is really hard to
work with.  So it definitely makes sense to use the transformer that
Greg & Bill wrote to get a decent abstract syntax.  At that point, you
can either generate bytecode directly or write a new code generate
that generates source from the AST.