[issue16970] argparse: bad nargs value raises misleading message

Robert Leenders report at bugs.python.org
Fri Jan 18 15:48:19 CET 2013


Robert Leenders added the comment:

Chris, you said (in the review) "Hmm, since this is for maintenance releases ... This change could cause "working" code to no longer work."

I understood from our original message that you wanted it to change since it is inconsistent. I vote for changing it (so that it gives an error) but since this is my first bug/patch, I don't really know what usually happens.

Either way, I adjusted the patch conform your comments. For now I removed the original changes to handle negative numbers and changed the message from "nargs must be > 0" to "nargs must be != 0".

----------
Added file: http://bugs.python.org/file28766/argparse-v2.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16970>
_______________________________________


More information about the Python-bugs-list mailing list