bpo-33832: Add "magic method" glossary entry (GH-7630) · python/cpython@f760610 (original) (raw)
File tree
2 files changed
lines changed
- Misc/NEWS.d/next/Documentation
2 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -663,6 +663,11 @@ Glossary | ||
663 | 663 | :term:`finder`. See :pep:`302` for details and |
664 | 664 | :class:`importlib.abc.Loader` for an :term:`abstract base class`. |
665 | 665 | |
666 | + magic method | |
667 | + .. index:: pair: magic; method | |
668 | + | |
669 | + An informal synonym for :term:`special method`. | |
670 | + | |
666 | 671 | mapping |
667 | 672 | A container object that supports arbitrary key lookups and implements the |
668 | 673 | methods specified in the :class:`~collections.abc.Mapping` or |
@@ -1004,6 +1009,8 @@ Glossary | ||
1004 | 1009 | (subscript) notation uses :class:`slice` objects internally. |
1005 | 1010 | |
1006 | 1011 | special method |
1012 | + .. index:: pair: special; method | |
1013 | + | |
1007 | 1014 | A method that is called implicitly by Python to execute a certain |
1008 | 1015 | operation on a type, such as addition. Such methods have names starting |
1009 | 1016 | and ending with double underscores. Special methods are documented in |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 | +Add glossary entry for 'magic method'. |