[New-bugs-announce] [issue15474] Differentiate decorator and decorator factory in docs

Éric Araujo report at bugs.python.org
Fri Jul 27 21:10:07 CEST 2012


New submission from Éric Araujo <merwok at netwok.org>:

Some of the confusion encountered when writing decorators arise from the difference between a decorator (@something) and a decorator factory (@something(args)).  It would help to adopt this clearer terminology in our docs: a decorator takes the decorated function as argument and does its business, a decorator factory takes some arguments and returns a decorator which wraps the decorated function.

(I think it was Nick who suggested this in a recent-ish mailing list thread.)

----------
assignee: docs at python
components: Documentation
messages: 166600
nosy: docs at python, eric.araujo, ncoghlan
priority: normal
severity: normal
status: open
title: Differentiate decorator and decorator factory in docs
versions: Python 2.7, Python 3.2, Python 3.3

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


More information about the New-bugs-announce mailing list