Decorators: an outsider's perspective

Paul Morrow pm_mon at
Sat Aug 14 16:21:00 CEST 2004

Christophe Cavalaria wrote:

> You are guilty of attacking the specific example instead of the general
> idea behind it.

Yes, sorry, but I'm in a pickle here.  I want (we need) the general idea 
of decorators --- the realm of problems that decorators try to solve --- 
to be made smaller.  They should not be used to declare a method's type 
(static|instance|class).  Decorators may have some valid purpose, but 
this is not one of them.

> Of course, it doesn't mean that I don't like your idea. In fact, it find it
> elegant except the the "klass" word which is ugly.

Thanks, but it's not my idea (well, a tiny part maybe).  The idea of 
inferring a method's type from the name of its first formal parameter 
was suggested by Stefan Eischet in another thread.

More information about the Python-list mailing list