[issue42179] Clarify chaining exceptions in tutorial/errors.rst

Vladimir Ryabtsev report at bugs.python.org
Thu Nov 5 13:27:57 EST 2020


Vladimir Ryabtsev <greatvovan at gmail.com> added the comment:

> I can not find confusion caused by this tutorial section

Inada, have you read the very first message in this ticket? It explains why this wording may cause confusion (and it did in me), and describes the problem part. A link for your convenience: https://docs.python.org/3/tutorial/errors.html#exception-chaining

> Describing the default behavior and "from None" is enough for new users

Strange that you think that "from None" is more useful for beginners than these special attributes.

Without understanding of __cause__ and __context__, stack traceback message looks like magic. Say you want to handle an exception and retrieve its cause (context) in runtime (this is what exception chaining for) – this section makes no clues about how to do that.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42179>
_______________________________________


More information about the Python-bugs-list mailing list