This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mirabilos
Recipients mirabilos
Date 2022-02-09.22:29:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1644445759.27.0.125748612313.issue46700@roundup.psfhosted.org>
In-reply-to
Content
The argparse documentation and tutorial as well as its default option groups speak of "positional arguments" and "optional arguments". These are not used correctly, though.

Elements of the argument vector (past item #0) are distinguished as options and (positional) arguments.

Options are either flags (ls "-l", cmd "/c") or GNU long options ("--help"). They are usually optional ("[-h]") but may be mandatory (such as -o/-i/-p for cpio(1)). They may have option arguments (cpio(1) "-H format").

Arguments (also called positional arguments) may be mandatory ("file") or optional ("[file]"). They are also called operands (mostly in POSIX, not very common).

The argparse documentation confused the hell out of me at first because I only saw argument documentation and could not find option documentation…
History
Date User Action Args
2022-02-09 22:29:19mirabilossetrecipients: + mirabilos
2022-02-09 22:29:19mirabilossetmessageid: <1644445759.27.0.125748612313.issue46700@roundup.psfhosted.org>
2022-02-09 22:29:19mirabiloslinkissue46700 messages
2022-02-09 22:29:19mirabiloscreate