3 ms·
Both are stable. Both will continue to be stable for a long time. The main difference lies with third party library support. There are a number of third part
by klodolph 16y ago
Both are stable. Both will continue to be stable for a long time.
The main difference lies with third party library support. There are a number of third party libraries that don't work with Python 3 yet. They will get ported eventually. If you want to use a library that doesn't support 3, then the choice is made for you.
The second difference lies with Linux distributions. On most distros you can just install the "python3" package and everything works, on a few distros you'll have to install Python 3 yourself or hunt down the right package repository (my info may be a year behind or so, I'm not sure). This also applies to third party libraries -- even if the library supports Python 3, your distro might not have a package for it, even if it has a package for that library for Python 2.
It's fairly easy (most of the time) to write code for Python 2.x that converts to Python 3 code with the bundled "2to3" converter. I do this for any script I might ever want to give to someone else or run on a computer that's not mine. Otherwise, I just write straight Python 3 code. Assuming, of course, that I don't need some library.
- TrevorBurnham 16y ago> They will get ported eventually. This is what worries me about Python: Python3 has been stable for a long while now, yet major projects (SciPy, Django) remain on 2.x, with no clear deadline for being ported to Python 3. Contrast this to Ruby, where Rails 3 is 1.8-compatible but recommends 1.9. Ruby 1.9 is being used in production even though it's not completely stable yet. In short, Ruby is clearly evolving, major libraries are constantly being updated for the latest version of the language, and everyone in the Ruby community has a strong sense of "getting better all the time." Python 3 is a better language than Python 2. That it's taken so long to become the canonical version makes me wonder about Python's future.
- klodolph 16y agoI don't think the circumstances compare. Python 3.x is different in a bunch of little ways from 2.x. Just like you say Rails 3 runs on Ruby 1.8 and 1.9, most Python libraries will run on 2.5, 2.6, or 2.7 (often 2.4 as well) without modification. Python 3.x breaks these libraries. Python 2.7 is also several months newer than Python 3.1. It reminds me of the 2.4 -> 2.6 transition for the Linux kernel. People were using 2.4 for a long time. Heck, you can still find Linux 2.4 in the wild.
- kjhghjklkjmn 16y ago>Ruby 1.9 is being used in production even though it's not completely stable yet That's the difference. Without being insulting, Ruby is used for web sites that don't matter - if your twitter feed about twilight goes down nobody cares. Python also gets used for stuff where a lot of $$$ dissapear if it goes too wrong