Very interesting :-)

It looks like a useful tool for producing a first rough cut of a python program.

-- Nick

On 20/10/18 05:16, Raffaele Sena wrote:
Inspired by ESR pytogo (and tired of writing python code), I went the complete opposite way and came up with pygor:

https://github.com/raff/pygorhttps://github.com/raff/pygor

pygor is written in Go, using the Python parser and AST from https://github.com/go-python/gpython (so right now it only targets Python 3.4). The origin of this was actually a python implementation that I started  a long time ago, using Python ast, but hat didn't go very far because it was hard to do Go things in python.

It doesn't generate runnable code, but aspire to generate at least code that passes the smell test of "go fmt" (with the problem that if "go fmt" fails to correctly format the code, the translation fails).

pygor also attempt to convert some of the python magic (list and dict comprehension, for example) to Go, again mainly in order to generate formatted code. And it also comes with a concept of "runtime" (automatically imported when needed) to implement a couple of things that are hard to do inline.

Enjoy,

Raffaele


--
You received this message because you are subscribed to the Google Groups "go-python" group. To unsubscribe from this group and stop receiving emails from it, send an email to go-python+unsubscr...@googlegroups.com <mailto:go-python+unsubscr...@googlegroups.com>. To post to this group, send email to go-pyt...@googlegroups.com <mailto:go-pyt...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/go-python/CANKfucYmWed786-ErNmO-Dyu-zVDSV43AfG17aDoMq1diq9Q9A%40mail.gmail.com <https://groups.google.com/d/msgid/go-python/CANKfucYmWed786-ErNmO-Dyu-zVDSV43AfG17aDoMq1diq9Q9A%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.


--
Nick Craig-Wood <n...@craig-wood.com> -- http://www.craig-wood.com/nick

--
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to