Skip to content

Commit

Permalink
bpo-33832: Add "magic method" glossary entry (pythonGH-7630)
Browse files Browse the repository at this point in the history
  • Loading branch information
andresdelfino authored and merwok committed Mar 27, 2019
1 parent dfd775a commit f760610
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Doc/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,11 @@ Glossary
:term:`finder`. See :pep:`302` for details and
:class:`importlib.abc.Loader` for an :term:`abstract base class`.

magic method
.. index:: pair: magic; method

An informal synonym for :term:`special method`.

mapping
A container object that supports arbitrary key lookups and implements the
methods specified in the :class:`~collections.abc.Mapping` or
Expand Down Expand Up @@ -1004,6 +1009,8 @@ Glossary
(subscript) notation uses :class:`slice` objects internally.

special method
.. index:: pair: 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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add glossary entry for 'magic method'.

0 comments on commit f760610

Please sign in to comment.