-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Reference Manual 6.3.1: wrong method mentioned #112331
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
Labels
docs
Documentation in the Doc dir
Comments
What do you mean? I explained what the problem is and how it should be resolved. |
@aichernig Will this revised text suffice?
|
rhettinger
added a commit
to rhettinger/cpython
that referenced
this issue
Nov 24, 2023
Yes almost perfect. I think the last sentence "If an :exc: |
rhettinger
added a commit
that referenced
this issue
Nov 25, 2023
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Nov 25, 2023
… mechanics (pythongh-112375) (cherry picked from commit 97f8f28) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Nov 25, 2023
… mechanics (pythongh-112375) (cherry picked from commit 97f8f28) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
rhettinger
pushed a commit
that referenced
this issue
Nov 25, 2023
rhettinger
pushed a commit
that referenced
this issue
Nov 25, 2023
aisk
pushed a commit
to aisk/cpython
that referenced
this issue
Feb 11, 2024
Glyphack
pushed a commit
to Glyphack/cpython
that referenced
this issue
Sep 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Documentation
6.3.1. Attribute references
This section states that "This production can be customized by overriding the
__getattr__()
method."This is wrong and should be replaced with "This production can be customized by overriding the
__getattribute__(self, attr)
method.".__getattr__()
is only called when the attribute is not found.__getattribute__(self, attr)
is the method that is called when accessing an attribute. Here is an example code for both:Hence, either mention both methods or only
__getattribute__
.Linked PRs
The text was updated successfully, but these errors were encountered: