]> granicus.if.org Git - python/commitdiff
Remove potentially confusing sentence in __mangling description.
authorGeorg Brandl <georg@python.org>
Thu, 13 Aug 2009 12:57:25 +0000 (12:57 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 13 Aug 2009 12:57:25 +0000 (12:57 +0000)
Doc/tutorial/classes.rst

index f59b01689d0282e026c426e35d26e0b159840d47..9a01f3abe454dd222449049ec966492430f65524 100644 (file)
@@ -549,11 +549,8 @@ such a mechanism, called :dfn:`name mangling`.  Any identifier of the form
 ``__spam`` (at least two leading underscores, at most one trailing underscore)
 is textually replaced with ``_classname__spam``, where ``classname`` is the
 current class name with leading underscore(s) stripped.  This mangling is done
-without regard to the syntactic position of the identifier, so it can be used to
-define class-private instance and class variables, methods, variables stored in
-globals, and even variables stored in instances.  Truncation may occur when the
-mangled name would be longer than 255 characters.  Outside classes, or when the
-class name consists of only underscores, no mangling occurs.
+without regard to the syntactic position of the identifier, as long as it
+occurs within the definition of a class.
 
 Note that the mangling rules are designed mostly to avoid accidents; it still is
 possible to access or modify a variable that is considered private.  This can