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

Compact IoT gateway runs Yocto Linux on Quark

Advantech is prepping an Intel Quark based IoT gateway that runs Yocto Linux and offers PoE support. mini-PCIe expansion, and web-based device management. Read more

Review: Linux Mint 17.2 Release is Refreshed and Faster

Linux Mint 17.2 "Rafaela" MATE was launched last week and, as usual, I installed it on my machines to see how this distro is progressing. I found a refreshed, faster and more feature-rich distro that's well worth trying. Read more

Samsung to train India’s Telangana youth in Tizen Tech

As part of the spread of Tizen education in India, Samsung will train the youth of the Telangana Academy on innovative digital technologies based on the Tizen operating system. Read more

Jolla cuts hardware biz loose to concentrate on Sailfish licensing

Hardware and software outfit Jolla is to give up making hardware, with that part of the business set to be taken on by a new, yet-to-be-announced company, with Jolla then concentrating on its Sailfish OS. Read more