Reply to post: Re: What happened in version 3?

For real this time, get your butt off Python 2: No updates, no nothing after 1 January 2020

Charlie Clark Silver badge

Re: What happened in version 3?

In practice, the syntax changes between Python 2.7 and Python >= 3.3 are minimal. The main change that caused problems, apart from print "hello world" becoming print("hello world"), was the stricter separation of unicode and encoded strings, which unicode becoming the default. Turns out that Python is used for lots of network and file system work so that this caused a lot more problems than anticipated. Once the unicode literal was reintroduced in Python 3, it became easy to write code that runs well in both and is straightforward to maintain.

The change was necessary because Python initially didn't have unicode support and added later. This wouldn't matter that much in an ASCII world, but Python has long been very international. There were other changes under the hood but this was the main sticking point for most. To this must be added that Python 3 required more memory and was slower than Python 2, which had benefitted from a performance release with 2.5. So 10 years ago developers were being asked to do some work to migrare their codebase to a slower platform. Yeah, not the best of arguments.

However, having maintained the codebase of a popular library since 2013, I can confirm that writing code that runs in both Python 2 and Python 3 isn't that hard.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2019