> On Nov 18, 2019, at 19:34, Brendan Barnwell wrote:
>
>
> I would say this is a poor design. Just write "wait" so that you always
> have to call it, and you just pass no arguments if you want the default.
> So instead of this:
>
> # default delay
> @wait
> def foo():
>
> # custom delay
>
On 2019-11-18 18:09, Samuel Muldoon wrote:
At present, multi-argument function decorators are a little bit
tricky to implement.
As an example (somewhat contrived), suppose that `wait` is a function
decorator which haults program execution for a few seconds before
calling the wrapped function.
On 18Nov2019 19:09, Samuel Muldoon wrote:
At present, multi-argument function decorators are a little bit tricky to
implement.
Aye, but one can write a decorator for decorators which makes it easy.
No extra syntax required.
I've one of my own called @decorator, available on PyPI from the