[New-bugs-announce] [issue45990] Exception notes need more documentation

Ram Rachum report at bugs.python.org
Sun Dec 5 12:49:09 EST 2021


New submission from Ram Rachum <ram at rachum.com>:

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.

----------
assignee: docs at python
components: Documentation
messages: 407722
nosy: cool-RR, docs at python, iritkatriel
priority: normal
severity: normal
status: open
title: Exception notes need more documentation
versions: Python 3.11

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


More information about the New-bugs-announce mailing list