Author Topic: Python Versions  (Read 2756 times)

Alex E

  • Rogueliker
  • ***
  • Posts: 118
  • Karma: +0/-0
    • View Profile
    • Email
Python Versions
« on: October 22, 2012, 12:58:22 AM »
Lately I've been trying to learn how to program in Python, and I've run into a problem.

I've been using Python 3.3.0 (The latest version), but it doesn't support too many libraries yet, such as Pygame. I can switch using versions at any time, but I'm not sure which version to use.

Anyone who knows a bit about Python want to give me some advice? What's the main difference between all these versions? And why are so many people still using v2.7.3 instead of the 3.x versions?
« Last Edit: October 22, 2012, 01:00:04 AM by Mosenzov »

XLambda

  • Rogueliker
  • ***
  • Posts: 208
  • Karma: +0/-0
    • MSN Messenger - tau_iota@live.de
    • View Profile
    • The Weird Rogue
Re: Python Versions
« Reply #1 on: October 22, 2012, 01:54:07 PM »
Anyone who knows a bit about Python want to give me some advice? What's the main difference between all these versions? And why are so many people still using v2.7.3 instead of the 3.x versions?

To quote the Python website: "Python 3.0, also known as “Python 3000” or “Py3K”, is the first ever intentionally backwards incompatible Python release."

Basically, a lot of the old 2.x libraries haven't switched over to 3.x yet because of the API changes. A ton of old 2.x code doesn't work on 3.x and would be a lot of work to port over.
When 3.x was introduced they replaced or removed parts of the API instead of just deprecating them (like Sun/Oracle does with the Java API), which caused somewhat of a stink.

They're slowly porting stuff over now, I think libtcod is already 3.x-compatible if you do some things.

Alex E

  • Rogueliker
  • ***
  • Posts: 118
  • Karma: +0/-0
    • View Profile
    • Email
Re: Python Versions
« Reply #2 on: October 22, 2012, 11:45:44 PM »
To quote the Python website: "Python 3.0, also known as “Python 3000” or “Py3K”, is the first ever intentionally backwards incompatible Python release."

Basically, a lot of the old 2.x libraries haven't switched over to 3.x yet because of the API changes. A ton of old 2.x code doesn't work on 3.x and would be a lot of work to port over.
When 3.x was introduced they replaced or removed parts of the API instead of just deprecating them (like Sun/Oracle does with the Java API), which caused somewhat of a stink.

They're slowly porting stuff over now, I think libtcod is already 3.x-compatible if you do some things.

In that case, I'll probably just stick with 3.x since, as you said, they are porting stuff over to it.


Darren Grey

  • Rogueliker
  • ***
  • Posts: 2004
  • Karma: +0/-0
  • It is pitch black. You are likely to eat someone.
    • View Profile
    • Games of Grey
Re: Python Versions
« Reply #3 on: October 30, 2012, 10:01:29 AM »
One problem is that end users tend not to have multiple pythons installed, especially on Windows where you can only have one version.  To ensure your game can be played you should stick with 2.7.