-
-
Notifications
You must be signed in to change notification settings - Fork 35k
gh-153785: Generate AttributeError messages from context
#153786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
ac555bc
4f22a16
b30d676
28e04d3
e5c4922
3854563
1e88331
2fd216a
356f56e
8db0394
ebcc795
b6fda10
d624835
c50a356
7ad5204
b65a7fd
e99d875
8c29de3
6faf358
086a0c9
e5bb17e
f2507a5
9c81069
e905ab2
7d720ac
337cef4
6aa47db
4ff6a48
e00db5f
b5ce3c9
da8c723
c941657
9ea6c8a
f825f27
7b73fb8
7378e30
faf6e53
a86fde5
9b00321
df7682c
a419eb2
a7e7f0a
08f8818
b9b8d7d
cb5ae96
404359d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -215,6 +215,8 @@ The following exceptions are the exceptions that are usually raised. | |
|
|
||
| The object that was accessed for the named attribute. | ||
|
|
||
| When possible, :attr:`name` and :attr:`obj` are set automatically. | ||
|
|
||
| .. versionchanged:: 3.10 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We dropped the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @serhiy-storchaka, do you agree on bringing it back?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We usually do not add versionchanged for minor changes like changed error message. Otherwise our documentation would be overwhelmed by them. |
||
| Added the :attr:`name` and :attr:`obj` attributes. | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| :exc:`AttributeError`: The default error message is now generated from ``name`` | ||
| and ``obj`` attributes when both are set and the exception was constructed with | ||
| no positional arguments, or with a single positional argument equal to ``name``. | ||
| Patch by Bartosz Sławecki. |
Uh oh!
There was an error while loading. Please reload this page.