Decorators

Andrew Durdin adurdin at gmail.com
Tue Aug 10 09:05:55 CEST 2004


On Mon, 09 Aug 2004 20:29:59 -0400, Colin J. Williams <cjw at sympatico.ca> wrote:
>
> There is also the question of whether 'decorator', a term which is used
> in everyday langage as indicating adornment, is the best choice for a
> transformation.

def deco(f):
    print f.__name__, "is now pretty!"
    return f

@deco
def ugly_function():
    pass



More information about the Python-list mailing list