Skip to content

Commit 28e04d3

Browse files
committed
Add docs
1 parent b30d676 commit 28e04d3

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Doc/library/exceptions.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,18 @@ The following exceptions are the exceptions that are usually raised.
215215

216216
The object that was accessed for the named attribute.
217217

218+
When possible, :attr:`name` and :attr:`obj` are set automatically
219+
for failed attribute lookups.
220+
218221
.. versionchanged:: 3.10
219222
Added the :attr:`name` and :attr:`obj` attributes.
220223

224+
.. versionchanged:: next
225+
The default error message is now generated from :attr:`name` and
226+
:attr:`obj` when both attributes are set and the exception was
227+
constructed with no positional arguments, or with a single positional
228+
argument equal to :attr:`name`.
229+
221230
.. exception:: EOFError
222231

223232
Raised when the :func:`input` function hits an end-of-file condition (EOF)

0 commit comments

Comments
 (0)