In the discussion over class decorators, Jim Jewett writes:
> I have often started with a function, and ended up replacing it with a
> callable object so that I could save state without resorting to
> "defalt args" or worse.
>
> I would prefer to decorate these exactly like the functions they replace.

I have observed the entire discussion about class decorators with absolutely
no opinion, until I read Jim's brief post quoted above. I am now completely
convinced that class decorators ought to exist and behave exactly like
function decorators. Thanks, Jim for pointing out what should have been
obvious to me from the start. The ability to use callable objects as
functions is a powerful tool in Python, and ought not be broken by decorator
inconsistencies.

-- Michael Chermside
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to