(Aug-30-2019, 03:59 AM)Skaperen Wrote: line 11 is @click.argument('arg', nargs=-1). where do those 2 "arguments" go?All is good document in Click Variadic Arguments .
Click doc Wrote:This can be controlled with the nargs parameter. If it is set to -1, then an unlimited number of arguments is accepted.
skapren Wrote:telling me that a decorator does make changes is not telling me how i could make use of the feature in my own programmingIf want to learn decorate then use tutorial/books it's a lot written about it,it's not the goal of Click to learn user decorator.
This is the goal,decorator help with "as little code as necessary" for users.
Click doc Wrote:Click is a Python package for creating beautiful command line interfaces in a composable way with as little code as necessary
Skaperen Wrote:do you know how to write a decorator function?Did write one one in post #5,just as an easy example to understand.
Also if write a more robust version that meant to be used be other would also used
@functools.wraps
.Or better wrapt.
This so metadata/signature of function eg
__module__
, __name__
, __qualname__
, __doc__
, and __annotations__
,don't get lost.I am finish with this Thread now ,the whole point was in post #2 to give a advice that i think Click is okay for these tasks.