[docs] [issue37545] Argparse Tutorial - unreasonable operators
Zachary Ware
report at bugs.python.org
Thu Jul 11 00:53:26 EDT 2019
Zachary Ware <zachary.ware at gmail.com> added the comment:
I don't agree with the proposed change; I think the examples are fine as is.
Using `>= 1` means if you later decide that the `-vv` message should actually only happen at `-vvv` and `-vv` should get the same message as `-v`, you only have to change the 2 to a 3 and you're done. With `== 1` you have to remember to either change `== 1` to `>= 1` or switch to `in {1, 2}`, or (more likely) forget to make the change initially and have to go back and fix it later.
The last example especially must not be changed; it is explicitly showing how to emit additional messages at higher verbosity levels.
I recommend closing this issue.
----------
nosy: +zach.ware
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37545>
_______________________________________
More information about the docs
mailing list