[New-bugs-announce] [issue6522] docs for unittest.expectedFailure do not syntactically show it's a decorator
Brett Cannon
report at bugs.python.org
Mon Jul 20 03:15:10 CEST 2009
New submission from Brett Cannon <brett at python.org>:
If you look at the docs for the unittest.expectedFailure decorator you
will notice it shows a set of empty parentheses since it is set with a
function directive. But since it's a decorator those empty parentheses
are not accurate.
If you want to view the docs as showing common usage -- like the docs
for the other decorators in unittest -- then those empty parentheses
need to go. An @ should also probably be added as well.
But if you view it more as how the decorator is called -- like with
importlib.util.module_for_loader does -- then it should have an argument
for the callable being passed in. This would also mean that all the
other decorators in unittest need a second set of parentheses taking a
callable as their argument as well.
Perhaps it's time we added a decorator directive that adds the @ sign
and does not insert empty parentheses?
----------
assignee: georg.brandl
components: Documentation
messages: 90718
nosy: brett.cannon, georg.brandl
priority: low
severity: normal
stage: needs patch
status: open
title: docs for unittest.expectedFailure do not syntactically show it's a decorator
type: feature request
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6522>
_______________________________________
More information about the New-bugs-announce
mailing list