]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-33832: Add "magic method" glossary entry (GH-7630)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 27 Mar 2019 01:26:52 +0000 (18:26 -0700)
committerGitHub <noreply@github.com>
Wed, 27 Mar 2019 01:26:52 +0000 (18:26 -0700)
(cherry picked from commit f760610bddd7e8f8ac0914d5d59ef806bc16a73b)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
Doc/glossary.rst
Misc/NEWS.d/next/Documentation/2018-06-15-15-57-37.bpo-33832.xBFhKw.rst [new file with mode: 0644]

index fb8ff2a7c6561235bec5f4c44c486bfda8a8d8fc..472351b485ac3cab51b60b843c6323ff359c4f9a 100644 (file)
@@ -659,6 +659,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
@@ -1000,6 +1005,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
diff --git a/Misc/NEWS.d/next/Documentation/2018-06-15-15-57-37.bpo-33832.xBFhKw.rst b/Misc/NEWS.d/next/Documentation/2018-06-15-15-57-37.bpo-33832.xBFhKw.rst
new file mode 100644 (file)
index 0000000..3d1c63a
--- /dev/null
@@ -0,0 +1 @@
+Add glossary entry for 'magic method'.