Skip to content
Myr

docs cleanup

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

authored by David Lord · committed by David Lord · parent 7933849 · Browse files · 1 file+11 added−12 removed
This commit

State

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

Diff stats

1 file+11 added−12 removed

  • other:+11 added−12 removed

1 file+11 added−12 removed

modified:docs/why.rst+11 added-12 removed
43 unmodified lines
4445Why not Argparse?46-----------------4748Click is internally based on ``optparse`` instead of ``argparse``. This48Click is internally based on ``optparse`` instead of ``argparse``. This49is an implementation detail that a user does not have to be concerned50with. The reason Click is not using argparse is it has some51problematic behaviors that make handling arbitrary command line interfaces52hard:50with. Click is not based on argparse because it has some behaviors that51make handling arbitrary command line interfaces hard:5254* argparse has built-in magic behavior to guess if something is an55 argument or an option. This behavior becomes a problem when dealing with56 incomplete command lines; the parsers behaviour becomes unpredictable57 without full knowledge of a command line. This goes against Click's53* argparse has built-in behavior to guess if something is an54 argument or an option. This becomes a problem when dealing with55 incomplete command lines; the behaviour becomes unpredictable56 without full knowledge of a command line. This goes against Click's57 ambitions of dispatching to subparsers.59* argparse currently does not support disabling of interspersed60 arguments. Without this feature, it's not possible to safely implement61 Click's nested parsing nature.58* argparse does not support disabling interspersed arguments. Without59 this feature, it's not possible to safely implement Click's nested60 parsing.6162Why not Docopt etc.?63--------------------6466Docopt, and many tools like, it are cool in how they work, but very few of65Docopt, and many tools like it, are cool in how they work, but very few of66these tools deal with nesting of commands and composability in a way like67Click. To the best of the developer's knowledge, Click is the first68Python library that aims to create a level of composability of applications69that goes beyond what the system itself supports.
78 unmodified lines