From 4a191fb2cf3b474f5d52ab706d96a18c3117cf6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Delfino?= Date: Fri, 15 Jun 2018 16:01:12 -0300 Subject: [PATCH 1/2] Add glossary entry for 'magic method' --- Doc/glossary.rst | 3 +++ .../Documentation/2018-06-15-15-57-37.bpo-33832.xBFhKw.rst | 1 + 2 files changed, 4 insertions(+) create mode 100644 Misc/NEWS.d/next/Documentation/2018-06-15-15-57-37.bpo-33832.xBFhKw.rst diff --git a/Doc/glossary.rst b/Doc/glossary.rst index 988842aefc0d67..e9c7d0a835abfb 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -658,6 +658,9 @@ Glossary :term:`finder`. See :pep:`302` for details and :class:`importlib.abc.Loader` for an :term:`abstract base class`. + 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 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 index 00000000000000..3d1c63acca3bb0 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2018-06-15-15-57-37.bpo-33832.xBFhKw.rst @@ -0,0 +1 @@ +Add glossary entry for 'magic method'. From 9cd4034c565f48cfb0a31f672dd38c9e7ad27730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Delfino?= Date: Fri, 22 Feb 2019 18:20:28 -0300 Subject: [PATCH 2/2] =?UTF-8?q?Address=20comment=20from=20=C3=89ric?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Doc/glossary.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Doc/glossary.rst b/Doc/glossary.rst index e9c7d0a835abfb..545361e7a89159 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -659,6 +659,8 @@ Glossary :class:`importlib.abc.Loader` for an :term:`abstract base class`. magic method + .. index:: pair: magic; method + An informal synonym for :term:`special method`. mapping @@ -1002,6 +1004,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