[issue23887] HTTPError doesn't have a good repr representation
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: patch review - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23887 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23887] HTTPError doesn't have a good repr representation
Changes by Facundo Batista facu...@taniquetil.com.ar: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23887 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23887] HTTPError doesn't have a good repr representation
Roundup Robot added the comment: New changeset e9ea679a92fa by Facundo Batista in branch 'default': Issue #23887: urllib.error.HTTPError now has a proper repr() representation. https://hg.python.org/cpython/rev/e9ea679a92fa -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23887 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23887] HTTPError doesn't have a good repr representation
Facundo Batista added the comment: Hi Berker, I like your patch, will apply it after doing a test for it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23887 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23887] HTTPError doesn't have a good repr representation
Martin Panter added the comment: Perhaps it would be more appropriate to set the BaseException.args attribute, or chain to its __init__() method, then you wouldn’t need a custom __repr__(). -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23887 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23887] HTTPError doesn't have a good repr representation
New submission from Facundo Batista: I normally print(repr()) the exception I got, for debugging purposes. I use repr() because for builtin exceptions, str() will print only the message, and not the exception type. But for HTTPError, the repr() of it is HTTPError(), without further explanation... -- messages: 240262 nosy: facundobatista priority: normal severity: normal status: open title: HTTPError doesn't have a good repr representation versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23887 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23887] HTTPError doesn't have a good repr representation
Berker Peksag added the comment: HTTPError.__str__ already provides useful information: ``'HTTP Error %s: %s' % (self.code, self.msg)``, but since the change is minimal and useful, here is a patch. -- components: +Library (Lib) keywords: +patch nosy: +berker.peksag stage: - patch review type: - enhancement versions: +Python 3.5 -Python 3.4 Added file: http://bugs.python.org/file38863/issue23887.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23887 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23887] HTTPError doesn't have a good repr representation
Demian Brecht added the comment: A test really should be added for this. Otherwise, LGTM. -- nosy: +demian.brecht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23887 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com