Khalid Mammadov added the comment:
This is another, larger example, where I actually stumbled on this when looking
into Apache Airflow project. Below makes it confusing to see what is actually
required and what not. Unless you look for square brackets. Would be it much
nicer to list required
Khalid Mammadov added the comment:
May I suggest to change it again so we two sections: required and optional?
This can help to be more clear from usage perspective. I have changed it
locally and it looks like below:
usage: myprogram.py [-h] [--foo FOO] --bar BAR
required arguments:
--bar
Raymond Hettinger added the comment:
In Python3.10, "optional arguments" has been replaced with "options".
We didn't backport the change because it risks breaking tests that rely on
exact string matches. Also, it was really a bug, it was just an unfortunate
choice of words. "Optional argum
New submission from Khalid Mammadov :
Currently argparse module shows all optional arguments under "optional
arguments" section of the help.
It also includes those flags/arguments that are required as well.
This add confusion to a user and does not properly show intention
--
component