Language Selection

English French German Italian Portuguese Spanish

What's New in Python 2.5

Filed under
Software

It's hard to believe Python is more than 15 years old already. While that may seem old for a programming language, in the case of Python it means the language is mature. In spite of its age, the newest versions of Python are powerful, providing everything you would expect from a modern programming language. This article provides a rundown of the new and important features of Python 2.5.

I assume that you're familiar with Python and aren't looking for an introductory tutorial, although in some cases I do introduce some of the material, such as generators.

Changes and Enhancements to the Language Itself

Python 2.5 includes many useful improvements to the language. None of the changes are huge; nor do they require changes to your existing 2.4 code.

Conditional Expressions

Other languages, particularly C and C++, have for years allowed conditional expressions, which are expressions that include an if statement. The idea is simple: You have a variable, and you want to set the variable to one value if some condition is true; otherwise, you want to set the variable to another variable.

Certainly, you could always do this in Python using a block if statement like so:

Full Story.

More in Tux Machines

Popcorn Time Makes Watching Movies Safer with Integrated VPN

Popcorn Time, an application that lets users stream movies and TV shows directly from torrents without having to download them, has been upgraded to version 0.3.6 and is now available for download. Read more

4MRecover 11.0 Beta OS Can Help Users Recover Lost Files

4MRecover 11.0 Beta, a new distribution based on 4MLinux that is designed to be used specifically for file recovery, is now available for download and testing. Read more

Android Leftovers

Will New Google Android Live TV Outfox Apple?

Google then rolled out its $35 Chromecast dongle, a streaming device, in mid-2013. Google's new Android TV operating system is expected to make it easier for software developers to move apps from mobile devices to TVs. Read more