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

NSA partners with Apache to release open-source data traffic program

In partnership with the Apache Software Foundation, the NSA announced on Tuesday that it is releasing the source code for Niagarafiles (Nifi). The spy agency said that Nifi "automates data flows among multiple computer networks, even when data formats and protocols differ". Read more

Expensive "Free/Libre Software Laptop" Uses A NVIDIA GPU

While there's been an ongoing discussion this week about delivering a $500 "open to the core" laptop that runs Ubuntu Linux and would be comprised of open-source software down to the firmware and Coreboot, announced last week was a high-end laptop that also aims to promote free/libre software. Though don't get out your wallets quite yet. Read more

Docker Update Fixes Pair of Critical Security flaws

The open-source Docker container virtualization technology has emerged as one of the hottest and most hyped technologies of the year. Docker, however, isn't immune from security vulnerabilities, as a pair of recent updates illustrate. Read more

Linux-based AUV maps Antarctic sea ice thickness

Woods Hole Oceanographic used a Linux-based “SeaBED” AUV to build the first 3D map of Antarctic sea ice — and found it’s thicker than had been estimated. Every now and then we see some good news about climate change sprinkled in with all the increasingly dire warnings. Yesterday, the New York Times reported that solar and wind energy are starting to become competitive with natural gas. On the same day, Woods Hole Oceanographic Institute (WHOI), based in Massachusetts, announced it had published a paper in Nature Geoscience on experiments run by an autonomous, Linux-based submarine called the SeaBED. The underwater survey indicated that Antarctic sea ice was thicker than had been previously estimated. Read more