[issue25436] argparse.ArgumentError missing error message in __repr__

2019-05-08 Thread Daniel Fortunov
Daniel Fortunov added the comment: As Paul points out, Python 3 gives a more sensible default repr so this becomes a non-issue. Closing... -- stage: patch review -> resolved status: open -> closed versions: +Python 2.7 -Python 3.4, Python 3.5, Python 3.6

[issue25436] argparse.ArgumentError missing error message in __repr__

2015-12-28 Thread Daniel Fortunov
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'

[issue25436] argparse.ArgumentError missing error message in __repr__

2015-10-19 Thread paul j3
paul j3 added the comment: The short `repr` is produced in Python2.7, but not 3.5. Your test case: action = argparse._StoreAction(['--file], dest='file_path') error = argparse.ArgumentError(action, 'File not found.') print(str(error)) print(repr(error)) With Python3.5 this disp

[issue25436] argparse.ArgumentError missing error message in __repr__

2015-10-18 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag stage: -> patch review type: -> behavior versions: +Python 3.4, Python 3.5, Python 3.6 ___ Python tracker ___ ___

[issue25436] argparse.ArgumentError missing error message in __repr__

2015-10-18 Thread Daniel Fortunov
New submission from Daniel Fortunov: ArgumentError's __init__() fails to call super(), meaning that the base exception doesn’t get a message, and thus repr() always returns “argparse.ArgumentError()” with no message. Not very helpful if that repr gets logged, or included in another error message