[issue25436] argparse.ArgumentError missing error message in __repr__
Daniel Fortunov
report at bugs.python.org
Mon Dec 28 13:25:10 EST 2015
Daniel Fortunov added the comment:
Paul,
Thanks for your comprehensive reply. I agree with everything you've said and the reason I've taken so long to reply is that I've been racking my brains to remember exactly how I came across this scenario.
I did at some point see an ArgumentError but I've forgotten the exact scenario. Since I can't see any of our internal codebase explicitly raising an ArgumentError, then I can only assume this must have just been a frustration I encountered when debugging into argparse code.
So I'll reformulate the question: Do you think it's worthwhile to make ArgumentError's repr() more useful for the purposes of interactive debugging alone?
Regards,
Dani
PS: I agree with your suggestion that you could achieve the same effect by defining a `__repr__` method for `ArgumentError`. I just thought that calling `super()` was more idiomatic.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25436>
_______________________________________
More information about the Python-bugs-list
mailing list