decorator 2.0 released

Michele Simionato michele.simionato at
Sat Jan 13 11:45:33 CET 2007

The aim of the decorator module it to simplify the usage of decorators
for the average programmer. Version 2.0 is a major release. From

Decorator module

Home page:


The decorator module is intented for usage in Python 2.4 and above,
but it also works with limitated functionality in Python 2.3 and
possibily below.


If you have ``easy_install``, just type ``easy_install decorator``,
unzip the distribution archive into a directory called "decorator"
in your Python path. For instance, on Unices you could give something
like that:

$ unzip -d decorator


Just go in the package directory and give

$ python documentation.txt

This will generate the file containing all the examples
discussed in the documentation, and will run the corresponding tests.

Backward compatibility

The 2.0 release of the decorator module breaks backward compatibility
a few minor ways.

- now ``decorator`` fails setting the right name for the decorated
  when using Python 2.3. I judged that this was an acceptable price
  considering that Python 2.3 has become pretty old and that in any
  using decorators in Python 2.3 is uncommon.

- now the decorated function and the original function do not share the
  same attributes, the decorated function has just a copy of the
  original function attributes.

- now the utility function ``getinfo`` returns a different dictionary;

- the utility function ``newfunc`` has been removed; its functionality
has been
  subsumed into ``update_wrapper``.


             Michele Simionato

More information about the Python-announce-list mailing list