This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Exception notes need more documentation
Type: Stage: resolved
Components: Documentation Versions: Python 3.11
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: cool-RR, docs@python, iritkatriel
Priority: normal Keywords:

Created on 2021-12-05 17:49 by cool-RR, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg407722 - (view) Author: Ram Rachum (cool-RR) * Date: 2021-12-05 17:49
The new __note__ feature for exception could be useful, but the documentation (and the section in "What's new") aren't good enough:

"__note__: A mutable field which is :const:`None` by default and can be set to a string. If it is not :const:`None`, it is included in the traceback. This field can be used to enrich exceptions after they have been caught."

This is more of a definition than an explanation. If this is solving a problem, there should be an explanation that starts from the problem being solved, hopefully with 2-3 examples where this is useful. If people start using this feature without some guidance, they might put things in the note that should have been in the message.
msg412173 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2022-01-30 20:07
https://www.python.org/dev/peps/pep-0678/
History
Date User Action Args
2022-04-11 14:59:53adminsetgithub: 90148
2022-01-30 20:07:38iritkatrielsetstatus: open -> closed

messages: + msg412173
stage: resolved
2021-12-05 17:49:09cool-RRcreate