summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-08-13 12:57:25 (GMT)
committerGeorg Brandl <georg@python.org>2009-08-13 12:57:25 (GMT)
commitaa66a968d4842c7dca0063c27520162d96fd7fe7 (patch)
treeb9cdc8c26807bb1e7d8c7c5cbc65be60651f3398 /Doc/tutorial
parentfb69631af70e6c6f3996c1ad365ac6038ba52d6d (diff)
downloadcpython-aa66a968d4842c7dca0063c27520162d96fd7fe7.zip
cpython-aa66a968d4842c7dca0063c27520162d96fd7fe7.tar.gz
cpython-aa66a968d4842c7dca0063c27520162d96fd7fe7.tar.bz2
Remove potentially confusing sentence in __mangling description.
Diffstat (limited to 'Doc/tutorial')
-rw-r--r--Doc/tutorial/classes.rst7
1 files changed, 2 insertions, 5 deletions
diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst
index f59b016..9a01f3a 100644
--- a/Doc/tutorial/classes.rst
+++ b/Doc/tutorial/classes.rst
@@ -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