[Python-ideas] AST Pretty Printer
Ryan
rymg19 at gmail.com
Fri Sep 13 18:14:19 CEST 2013
Honestly, it wasn't really the parenthesis that made me hate Lisp; it was everything else. The lack of line numbers,... It made Perl look nice for a second there.
Paul Tagliamonte <paultag at debian.org> wrote:
>On Thu, Sep 12, 2013 at 06:31:08PM -0500, Ryan wrote:
>> I always encounter one problem when dealing with Python ASTs: When
>I print
>> it, it looks like Lisp(aka Lots of Irritated Superfluous
>Parenthesis). In
>> short: it's a mess.
>
>Bwahah; well, to each their own.
>
>As some might remember from PyCon this year[1], I actually wrote a lisp
>front-end (OK, not *really* lisp) to Python AST. Works pretty well
>(even
>smoothed out the 2.x and 3.x differences, so most code is valid between
>the two)
>
> https://github.com/hylang/hy
>
>Yes, it's hilarious. No, parens aren't ugly :)
>
>> My idea is an AST pretty printer built on ast.NodeVisitor. If
>anyone finds
>> this interesting, I can probably have a prototype of the class
>between
>> later today and sometime tomorrow.
>
>I'd enjoy such a thing!
>
>
>[1]: http://pyvideo.org/video/1853/friday-evening-lightning-talks
> http://hylang.org/
> http://www.youtube.com/watch?v=ulekCWvDFVI
>
>--
> .''`. Paul Tagliamonte <paultag at debian.org>
>: :' : Proud Debian Developer
>`. `'` 4096R / 8F04 9AD8 2C92 066C 7352 D28A 7B58 5B30 807C 2A87
> `- http://people.debian.org/~paultag
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130913/7d91bb6d/attachment.html>
More information about the Python-ideas
mailing list