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
improve __getattribute__ documentation #48767
Comments
http://docs.python.org/dev/3.0/reference/datamodel.html#special-lookup (After fixing the link to http://docs.python.org/3.0 at http://www.python.org/doc/ (and likewise the http://docs.python.org/whatsnew/3.0.html link.)... The comment that __getattribute__ is "Called unconditionally to "__getattribute__ is NEVER accessible in pure python code when the code Thank you, and great work! |
>>> class c:
... def __getattribute__(self,*args):
... print('getattribute chimes in')
...
>>> c()+3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for +: 'c' and 'int' |
Isn't what you refer to covered by this paragraph and the following |
Yes to msg77021. However! I'll pin the difficulty specifically to the word "may". This cost me a
"... implicit special method lookup bypasses the __getattribute__()
Thank you. |
I've changed "may bypass" to "generally bypasses". It doesn't happen for I've also added a glossary entry "special method" in r67579. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: