Python

Release of Python 2.4, release candidate 1

What's New in Python 2.4 details the changes and additions in this release. Download the release here.

Most of the additions were discussed here in the past. Notable among them are generator expressions and function and method decorators.

Generic Functions have Landed (Python)

A semi-stable generic function API for Python.

Somewhere between CLOS style OOP and AOP, I'd say.

I don't have the time to explore this, but other might wnat to give it a go and report their experience.

Cache decorator in python 2.4

Yet another simple example of decorators in Pyhton (via Daily Python-URL).

A simple equation solver using attribute access and introspection

A nice hack which makes use of several language features to create a fun programming experience (or "user inteface" if you want).

GvR: Rejecting the J2 decorators proposal

Yet another example of language design in action. The specific issues Guido is concerned about are perhaps of less importance than this concluding remark,

A warning: some people have shown examples of extreme uses of decorators. I've seen decorators proposed for argument and return type annotations, and even one that used a decorator to create an object that did a regular expression substitution. Those uses are cute, but I recommend being conservative when deciding between using a decorator or some other approach, especially in code that will see a large audience (like 3rd party library packages). Using decorators for type annotations in particular looks tedious, and this particular application is so important that I expect Python 3000 will have optional type declarations integrated into the argument list.

Python Decorators

A short and accessible explanation of decorators (new in Pyton 2.4). [via Keith]

XML feed