Skip to content

Commit 6cbb4c0

Browse files
bpo-33832: Add "magic method" glossary entry (GH-7630)
(cherry picked from commit f760610) Co-authored-by: Andre Delfino <[email protected]>
1 parent 5a33169 commit 6cbb4c0

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Doc/glossary.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,11 @@ Glossary
490490
:meth:`load_module`. A loader is typically returned by a
491491
:term:`finder`. See :pep:`302` for details.
492492

493+
magic method
494+
.. index:: pair: magic; method
495+
496+
An informal synonym for :term:`special method`.
497+
493498
mapping
494499
A container object that supports arbitrary key lookups and implements the
495500
methods specified in the :class:`~collections.Mapping` or
@@ -698,6 +703,8 @@ Glossary
698703
versions, :meth:`__getslice__` and :meth:`__setslice__`).
699704

700705
special method
706+
.. index:: pair: special; method
707+
701708
A method that is called implicitly by Python to execute a certain
702709
operation on a type, such as addition. Such methods have names starting
703710
and ending with double underscores. Special methods are documented in
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add glossary entry for 'magic method'.

0 commit comments

Comments
 (0)