[docs] [issue15474] Differentiate decorator and decorator factory in docs

Ezio Melotti report at bugs.python.org
Fri Nov 23 00:20:49 CET 2012


Ezio Melotti added the comment:

The tutorial doesn't seem to mention decorators, do you think this should be covered there?
FWIW while explaining decorators I usually use 3 examples:
 1) a simple decorator that accepts a function, does something, and returns the same function;
 2) a decorator that defines and returns an inner function;
 3) a decorator factory, that defines two nested inner functions

Not sure if it's necessary to include the first example though.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15474>
_______________________________________


More information about the docs mailing list