Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

Then you would get

>>> raise asyncio.CancelledError
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
asyncio.exceptions.CancelledError: CancelledError

instead of

>>> raise asyncio.CancelledError
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
asyncio.exceptions.CancelledError

Many existing code include both of exception name and message in the report 
about exception. Repeating the exception name as exception message will cause 
confusing.

You should follow common practice and print not just an exception object, but 
its name or repr. It will help in other cases, when the exception has non-empty 
message, but you do not know its type.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45671>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to