[New-bugs-announce] [issue46700] wrong nomenclature (options vs. arguments) in argparse

mirabilos report at bugs.python.org
Wed Feb 9 17:29:19 EST 2022


New submission from mirabilos <tg at debian.org>:

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…

----------
components: Library (Lib)
messages: 412952
nosy: mirabilos
priority: normal
severity: normal
status: open
title: wrong nomenclature (options vs. arguments) in argparse
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46700>
_______________________________________


More information about the New-bugs-announce mailing list