johnny
johnny

Reputation: 19755

What will I not learn about Python 2.7 and 3.x, if I start with Jython?

If I learn Jython first, does that mean I will also be learning all of the Python language? When I say all, I mean all the basic constructs of the language, nothing else. What will I not learn about Python or CPython, if I start with Jython? Thanks.

Upvotes: 3

Views: 105

Answers (1)

jsbueno
jsbueno

Reputation: 110591

There is no drawback in learning Jython - it is a conformant implementation of Python 2's syntax - and the differences to Python3 are just the one you will find documented everywhere.

I don't know where jython stands in terms of implementation of Python's stdlib - but I believe it has most of Python's 2.7 stdlib in place and working - some modules won't work, like "ctypes" for example. But as far as the language constructs go, you will be fine.

(IMO it is a good tool, not only for what you want, but a nice tool for exploring Java's libraries themselves in an interactive way, since you can use any Java class from the jython interactive shell)

As for the comments talking about unavailable modules: those are 3rd party modules installable on CPython. You certainly don't need them to get the language constructs, like you want. It is a trade off: you loose a lot of the Python ecosystem, but you can use the Java ecosystem in its place. And certainly, when starting a new project, you can just use normal CPython with whatever modules you need: the language is the same.

Upvotes: 4

Related Questions