Python 3.0 arrives, overhauling previous versions



Email    print   
December 4, 2008 —  Python 3.0 arrived yesterday, bringing with it sweeping changes. The drastic update to the dynamic scripting language even breaks “Hello, World!” But it's all in the name of purging special cases, outliers and inconsistencies from the language.

The update was a long time coming, said Raymond Hettinger, member of the Python Software Foundation board and a core developer of the language.

“It had to be done,” he said. “Python has gone through a number of evolutions. Initially, it was not an object-oriented language. Later, object orientation was added on top. Then there was a change in how objects were implemented.

“The challenge for the developers, for the past few years, was, 'This works with a new style class, this works with the old style class.' [Now] you no longer need to know the differences. The new language is just a little more beautiful in that regard.”

The changes in 3.0 are so far-reaching that even the humble Print statement has been changed. It's now a full-blown function. Said Hettinger, “One of my issues with changing the Print statement that made me step back was, you know, on your first day learning to program, you write 'Hello, World!' We just broke 'Hello, World!' ”

The problem, said Hettinger, was that Print was constantly being shoehorned into odd behaviors it was incapable of performing on its own. Aside from its use by newbies learning how to program, Print is typically used only for debugging purposes. That meant a number of hacks had to be concocted over the years to properly output program errors to log files.

As a function, Print can handle such needs with more elegance, said Hettinger. The Python 3.0 team even piped in log functionality with a specific Print modifier.

Other changes include the integration of Python's two integer types. “Every time long integers printed, they had an 'L' on the end of them," said Hettinger. "For several years, we've been trying to unify integers and long integers. They're a single entity in 3.0.

“One of the nicest differences [in feel] between 3.0 and 2.x Python [3.0] is cleaner all the way across the board,” said Hettinger. “Python used to be filled with little special-case rules. We've always had complaints about the standard library. There are some early Internet RFC modules that were obsolete. We had a ton of modules that were obsolete. But we couldn't take them out, because people were relying on them. For the most part, all of those are gone. So 3.0 is easier to learn, and cleaner.”

Python 3.0 is available from Python.org. Users looking to transition from older editions will want to move their applications to Python 2.6 first, since the transition release includes tools for bringing old code to the new version of the language.




Related Search Term(s): Python


Share this link: http://sdt.bz/33095
 
Most Read Latest News Blog Resources

Add comment


Name*
Email*  
Country     


  • Comment
Loading




close
NEXT ARTICLE
ActiveState prepares Perl, Python for platform project
Stackato will bring those languages to Cloud Foundry Read More...
 
 
 
 
News on Monday
more>>
SharePoint Tech Report
more>>


   

 
 

Download Current Issue
FEBRUARY 2012 PDF ISSUE

Need Back Issues?
DOWNLOAD HERE

Want to subscribe?


 
blogs tab
Are you at risk for burnout?
Burnout is a severe problem and it can strike at any time. Here's how to tell if you are nearing the edge.
02/09/2012 02:16 PM EST

Agility, mom, and apple pie
If we're to evaluate the state-of-the-art in software development, we should start with the values espoused in the Agile Manifesto.
02/07/2012 11:57 AM EST

RIM woos developers with free tablet
How do you get more apps ported to the BlackBerry PlayBook? By giving every developer a free tablet, of course!
02/04/2012 01:57 PM EST

GitHire: Use Headhunters to Find Your Perfect Programmer
Are you a hiring manager tired of scouring the job boards? Check out this new service that will find 5 people interested in your jobs.
02/03/2012 12:17 PM EST

Facebook claims hacker cred
Facebook's SEC S-1 filing form includes a short essay on the Hacker Way by Mark Zuckerberg himself.
02/02/2012 08:26 AM EST

Ryan Dahl steps down
Ryan Dahl, creator of Node.js, steps back from his position as gatekeeper for the project.
02/01/2012 04:58 PM EST

 
Events calendar tab
2/13/2012 to 2/16/2012
Santa Clara
TechWeb

2/26/2012 to 2/29/2012
San Francisco
BZ Media

2/27/2012 to 3/2/2012
San Francisco
RSA

3/4/2012 to 3/7/2012
Las Vegas
IBM Tivoli

3/5/2012 to 3/9/2012
San Francisco
TechWeb