kagan770 / py2scala Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/py2scala
Automatically exported from code.google.com/p/py2scala
This is a Improvement Request or Feature Request, if you will.
IMHO, the program should employ AST instead of parsing text
http://docs.python.org/2/library/ast.html
You just have to ask Python to load the program to be converted.
Python will return an AST for the program loaded.
Then you visit the tree and generate Scala code.
Original issue reported on code.google.com by [email protected]
on 21 Nov 2013 at 5:11
This is an Improvement Request or Feature Request, if you will.
Python generators are amazing for certain kinds of applications, in particular
those which involve some sort of delay for every chunk of information, like
typically applications consuming data from the web or other resources from the
network.
Scala continuations is the closest thing to Python generators.
Unfortunately, Scala continuations require a lot of boilerplate to be a viable
solution. This article in SO explains how Python generators can be replaced by
Scala continuations:
http://stackoverflow.com/questions/7303166/preferred-way-to-implement-yield-in-scala/11277282#11277282
Notice that Scala continuations are substantially different from Python
generators, which means that not all converted code will work as expected or
even compile, I guess.
Original issue reported on code.google.com by [email protected]
on 21 Nov 2013 at 5:16
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.