Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
9a053731
Commit
9a053731
authored
Dec 05, 2008
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#4517: add "special method" glossary entry and clarify when __getattribute__ is bypassed.
parent
fe879e8a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
Doc/glossary.rst
Doc/glossary.rst
+6
-0
Doc/reference/datamodel.rst
Doc/reference/datamodel.rst
+1
-1
No files found.
Doc/glossary.rst
View file @
9a053731
...
...
@@ -498,6 +498,12 @@ Glossary
(subscript) notation uses :class:`slice` objects internally (or in older
versions, :meth:`__getslice__` and :meth:`__setslice__`).
special method
A method that is called implicitly by Python to execute a certain
operation on a type, such as addition. Such methods have names starting
and ending with double underscores. Special methods are documented in
:ref:`specialnames`.
statement
A statement is part of a suite (a "block" of code). A statement is either
an :term:`expression` or a one of several constructs with a keyword, such
...
...
Doc/reference/datamodel.rst
View file @
9a053731
...
...
@@ -2370,7 +2370,7 @@ the instance when looking up special methods::
True
In addition to bypassing any instance attributes in the interest of
correctness, implicit special method lookup
may also bypas
s the
correctness, implicit special method lookup
generally also bypasse
s the
:meth:`__getattribute__` method even of the object's metaclass::
>>> class Meta(type):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment