diff options
author | Bénédikt Tran <10796600+picnixz@users.noreply.github.com> | 2024-07-13 14:45:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-13 14:45:18 (GMT) |
commit | f4d6e45c1e7161878b36ef9e876ca3e44b80a97d (patch) | |
tree | ea4311c91c6c5025030a01f11e8517f83ebde88f /Doc/tutorial | |
parent | 422855ad21f09b82c0bfa891dfb8fb48182c6d2b (diff) | |
download | cpython-f4d6e45c1e7161878b36ef9e876ca3e44b80a97d.zip cpython-f4d6e45c1e7161878b36ef9e876ca3e44b80a97d.tar.gz cpython-f4d6e45c1e7161878b36ef9e876ca3e44b80a97d.tar.bz2 |
gh-120452: improve documentation about private name mangling (#120451)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Diffstat (limited to 'Doc/tutorial')
-rw-r--r-- | Doc/tutorial/classes.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst index 1b64741..675faa8 100644 --- a/Doc/tutorial/classes.rst +++ b/Doc/tutorial/classes.rst @@ -688,6 +688,11 @@ current class name with leading underscore(s) stripped. This mangling is done without regard to the syntactic position of the identifier, as long as it occurs within the definition of a class. +.. seealso:: + + The :ref:`private name mangling specifications <private-name-mangling>` + for details and special cases. + Name mangling is helpful for letting subclasses override methods without breaking intraclass method calls. For example:: |