First page Back Continue Last page Overview Graphics

Decorators - Summary

A decorator in Python is any callable Python object, that is used to modify a function or a class.

The original object, the one which is going to be modified, is passed to a decorator as an argument.

The decorator returns a modified object, e.g. a modified function, which is bound to the name used in the function.