File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -592,11 +592,8 @@ such a mechanism, called :dfn:`name mangling`. Any identifier of the form
592592``__spam `` (at least two leading underscores, at most one trailing underscore)
593593is textually replaced with ``_classname__spam ``, where ``classname `` is the
594594current class name with leading underscore(s) stripped. This mangling is done
595- without regard to the syntactic position of the identifier, so it can be used to
596- define class-private instance and class variables, methods, variables stored in
597- globals, and even variables stored in instances. Truncation may occur when the
598- mangled name would be longer than 255 characters. Outside classes, or when the
599- class name consists of only underscores, no mangling occurs.
595+ without regard to the syntactic position of the identifier, as long as it
596+ occurs within the definition of a class.
600597
601598Note that the mangling rules are designed mostly to avoid accidents; it still is
602599possible to access or modify a variable that is considered private. This can
You can’t perform that action at this time.
0 commit comments