[Python-Dev] decorator support

"Martin v. Löwis" martin at v.loewis.de
Mon Sep 6 22:00:59 CEST 2004

> If there is a general agreement about what to do to wrap a decorator,
> why no use the following syntax
> @decorator
> def trace(f):

I've thought of that, and it is tempting. However, it does not give
you any clue what the decorator actually *does*, that's why I don't
like it. People would declare any decorator using @decorator, without
thinking whether they actually need to make that declaration. By
design, any function (or, any callable for that matter) can serve
as a decorator, so having a declaration for it might actually add


More information about the Python-Dev mailing list