mirror of
https://github.com/python/cpython.git
synced 2025-10-01 12:52:18 +00:00
bpo-33832: Add "magic method" glossary entry (GH-7630)
This commit is contained in:
parent
dfd775a0b1
commit
f760610bdd
2 changed files with 8 additions and 0 deletions
|
@ -663,6 +663,11 @@ Glossary
|
||||||
:term:`finder`. See :pep:`302` for details and
|
:term:`finder`. See :pep:`302` for details and
|
||||||
:class:`importlib.abc.Loader` for an :term:`abstract base class`.
|
:class:`importlib.abc.Loader` for an :term:`abstract base class`.
|
||||||
|
|
||||||
|
magic method
|
||||||
|
.. index:: pair: magic; method
|
||||||
|
|
||||||
|
An informal synonym for :term:`special method`.
|
||||||
|
|
||||||
mapping
|
mapping
|
||||||
A container object that supports arbitrary key lookups and implements the
|
A container object that supports arbitrary key lookups and implements the
|
||||||
methods specified in the :class:`~collections.abc.Mapping` or
|
methods specified in the :class:`~collections.abc.Mapping` or
|
||||||
|
@ -1004,6 +1009,8 @@ Glossary
|
||||||
(subscript) notation uses :class:`slice` objects internally.
|
(subscript) notation uses :class:`slice` objects internally.
|
||||||
|
|
||||||
special method
|
special method
|
||||||
|
.. index:: pair: special; method
|
||||||
|
|
||||||
A method that is called implicitly by Python to execute a certain
|
A method that is called implicitly by Python to execute a certain
|
||||||
operation on a type, such as addition. Such methods have names starting
|
operation on a type, such as addition. Such methods have names starting
|
||||||
and ending with double underscores. Special methods are documented in
|
and ending with double underscores. Special methods are documented in
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Add glossary entry for 'magic method'.
|
Loading…
Add table
Add a link
Reference in a new issue