[Python-Dev] parsers and import hooks [Was: Revive the types sig?]

Neil Schemenauer nas@arctrix.com
Mon, 12 Mar 2001 16:07:30 -0800


[Recipient addresses brutally slashed.]

On Mon, Mar 12, 2001 at 06:41:01PM -0500, Guido van Rossum wrote:
> I'm not sure this is viable.  I believe Jeremy's compiler package
> actually doesn't have its own parser -- it uses the parser module
> (which invokes Python's standard parse) and then transmogrifies the
> parse tree into something more usable, but it doesn't change the
> syntax!

Yup.  Having a more flexible Python-like parser would be cool but
I don't think I'd ever try to implement it.  I know Christian
Tismer wants one.  Maybe he will volunteer. :-)

[On using import hooks to load modules with modified syntax/semantics]
> That would be nice, indeed.

Its nice if you can get it to work.  import hooks are a bitch to
write and are slow.  Also, you get trackbacks from hell.  It
would be nice if there were higher level hooks in the
interpreter.  imputil.py did no do the trick for me after
wrestling with it for hours.

  Neil