News on Monday
more>>
SharePoint Tech Report
more>>


   

 
 
Download Current Issue
ISSUE 3/15/2010 PDF

Need Back Issues?
DOWNLOAD HERE

Receive the print Edition?


 
blogs tab
ASP.NET MVC 2 Ships
ASP.NET MVC 2 has shipped.
03/12/2010 10:26 AM EST

Microsoft plans 'open' Silverlight analytics framework
Microsoft is going to announce a multipurpose analytics framework for Silverlight at MIX.
03/11/2010 09:51 AM EST

About CSS processing
Two sites that lead to a startling CSS conclusion.
03/10/2010 02:29 AM EST

 

Events calendar tab
3/14/2010 to 3/18/2010
Seattle, Wa.
SHARE

3/15/2010 to 3/18/2010
Santa Clara, Calif.
TechWeb

3/15/2010 to 3/17/2010
Las Vegas
Microsoft

3/16/2010 to 3/19/2010
Las Vegas
Penton Media

3/17/2010 to 3/19/2010
Las Vegas
TechTarget


 
Most Read Latest News Blog Resources

Python 3.0 arrives, overhauling previous versions




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://www.sdtimes.com/link/33095
 

Add comment


Name*
Email*  
Country     


  • Comment
  • Preview
Loading