[3.13] gh-120452: improve documentation about private name mangling (GH-120451) (#121715)

gh-120452: improve documentation about private name mangling (GH-120451)
(cherry picked from commit f4d6e45c1e)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Miss Islington (bot) 2024-07-13 17:21:30 +02:00 committed by GitHub
parent b9cfb812e2
commit 4af9c05e78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 69 additions and 15 deletions

View file

@ -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::