Decorator help

Joseph L. Casale jcasale at
Wed Mar 27 21:41:48 CET 2013

> So  decorators will never take instance variables as arguments (nor should they, since no instance
> can possibly exist when they execute).

Right, I never thought of it that way, my only use of them has been trivial, in non class scenarios so far.

> Bear in mind, a decorator should take a callable as an argument (and any number of 'static' parameters
> you want to assign  it), and return another callable.

Got it, and thanks for the detail as well!

More information about the Python-list mailing list