Skip to content
Myr

Merge pull request #34 from julen/doc-fixes

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parents 84b2dc2, d7c12fb · Browse files · 2 files+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Docs: fixed typos

Diff stats

2 files+3 added−3 removed

  • other:+3 added−3 removed

2 files+3 added−3 removed

modified:docs/options.rst+1 added-1 removed
178 unmodified lines
179Choice Options180--------------181182Sometimes you want to have a parameter be a choice of a list of values.183In that case you can use :class:`Choice` type. It can be instanciated183In that case you can use :class:`Choice` type. It can be instantiated184with a list of valid values.185186Example:187
233 unmodified lines
modified:docs/why.rst+2 added-2 removed
71 unmodified lines
72knowledge, click is the first Python library that tries to aim for73composability of applications that goes beyond what the system itself74supports.7576For instance a Click subcommand could accept all the arguments unparsed76For instance a click subcommand could accept all the arguments unparsed77and then be parsed with docopt if that command would want to work that78way.7980Why Hardcoded Behaviors?
4 unmodified lines
85reasons for this. The biggest one is that too much configurability makes86it hard to achieve a consistent command line experience.8788The best example for this is optparse's ``callback`` functionality for89accepting arbitrary number of arguments. Due to syntactical ambuiguities89accepting arbitrary number of arguments. Due to syntactical ambiguities90on the command line there is no way to implement fully variadic arguments.91There are always tradeoffs that need to be made and in case of92``argparse`` these tradeoffs have been critical enough, that a system like93click cannot even be implemented on top of it.
4 unmodified lines