14

I used Python a few years ago when 2 was the only version.

Now there is 2 and 3.

Was there a a reason 2 hasn't continued to upgrade and now there is a split into two different pythons? Like no one uses Python 2.5. They all use 2.7 or whatever it is. Why not just use 3? Obviously there's a reason, but I was unable to find it googling.

My second question is, which one should I use? I am assuming 3, but that's ONLY based on the higher number. I wonder why 2 is still around if 3 is out??? If there aren't any major bugs with 3, I am just going to use that as I don't reckon it much matters: either one would probably work for py QT.

SwimBikeRun
  • 4,192
  • 11
  • 49
  • 85
  • 5
    There are lots of incompatibilities (breaking changes and syntax differences) in 3, that's why (as I underdstand it), 2.7 is more popular then 3. Look here: http://wiki.python.org/moin/Python2orPython3 – Gabriel Magana Nov 12 '11 at 06:36
  • http://wiki.python.org/moin/Python2orPython3 -- **my** reason would be lack of support for libraries i use. And Python 2.7 will be around till 2014 and maybe even longer. – Jesvin Jose Nov 12 '11 at 06:39
  • you can ckeck [When and why are you planning to upgrade to Python 3.x](http://stackoverflow.com/questions/663544/when-and-why-are-you-planning-to-upgrade-to-python-3-x/8057024#8057024) – joaquin Nov 12 '11 at 13:50
  • Please accept answers to questions when you are satisfied with them, by clicking the check-mark next to what you consider the best answer. – Karl Knechtel Nov 12 '11 at 15:27

4 Answers4

10

Why not just use 3?

A lot of existing Python code is not compatible with Python 3 yet. If you need to use Django for example you are forced to use Python 2.x.

My second question is, which one should I use?

Community
  • 1
  • 1
Mark Byers
  • 811,555
  • 193
  • 1,581
  • 1,452
  • I will never use Python 3 until I forced to. Python 3 is really bad name for the new (python-based) language. python is good enough as it is. Name new language differently (python++, pick name from here: en.wikipedia.org/wiki/Pythonidae). Being consistent with naming is part of good programming! – lowtech May 12 '14 at 22:05
3

Python 3 is significantly different than Python 2.x, and breaks numerous libraries and likely a lot of other dependent code. Python 2.x will likely be around for quite a while, as libraries are ported and 3.0 is field-tested.

codekaizen
  • 26,990
  • 7
  • 84
  • 140
1

it costs a lot to upgrade from python 2.x to python 3, that's why my project still uses python 2.7

piggy_Yu
  • 193
  • 3
  • 11
1

The latest Ubuntu doesn't ship with Python 3. 12.04 will but that's not out yet.

OpenBSD doesn't have a package for Python 3, either.

Some people may just not have Python 3 on their platform and don't care to compile.

Ishpeck
  • 2,001
  • 1
  • 19
  • 21