Jump to content

Welcome, Guest!

Sign in to follow this  
zag

Python v2 vs. Python v3

Recommended Posts

Short version: Python 2.x is the status quo, Python 3.x is the present and future of the language

 

Guido van Rossum (the original creator of the Python language) decided to clean up Python 2.x properly, with less regard for backwards compatibility than is the case for new releases in the 2.x range. The most drastic improvement is the better unicode support (with all text strings being unicode by default) as well as saner bytes/unicode separation.

 

Besides, several aspects of the core language (such as print and exec being statements, integers using floor division) have been adjusted to be easier for newcomers to learn and to be more consistent with the rest of the language, and old cruft has been removed (for example, all classes are now new-style, range() returns a memory efficient iterable, not a list as in 2.x).

 

The What's New in Python 3.0 document provides a good overview of the major language changes and likely sources of incompatibility with existing Python 2.x code.

 

However, the broader Python ecosystem has amassed a significant amount of quality software over the years. The downside of breaking backwards compatibility in 3.x is that a lot of that software doesn't work on 3.x yet.

 

More on the official Python Wiki

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

About Us

Bringing you the latest Raspberry Pi news, tutorials and user forum.

The Fruity Computer

×
×
  • Create New...