[docs] [issue37545] Argparse Tutorial - unreasonable operators

Aldwin Pollefeyt report at bugs.python.org
Thu Jul 11 01:52:31 EDT 2019

Aldwin Pollefeyt <aldwinaldwin at gmail.com> added the comment:

The >= is unnecessary in this exact example, as is correctly noted by Nathan.

I understand using >= for future purposes, after you explained, what is also correct but confusing because you specifically describe why you change the >= 2, but it doesn't make sense for >= 1 then.

For the last example, I might be completely wrong (please don't shoot me), IMHO it can be == 1 also? It is not 'explicitly showing how to emit additional messages at higher verbosity levels', but to 'uses verbosity level to display more text'. So, removing the 'else' statement to always print(answer), no matter which verbosity is shown.

To avoid confusion, I recommend the change and please have another look at the last statement that makes no difference in using == or >=.


Python tracker <report at bugs.python.org>

More information about the docs mailing list