summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2014-09-18 03:05:14 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2014-09-18 03:05:14 (GMT)
commit2d510e3babab0910fe457cc16e758521332ca1d3 (patch)
tree6dfc7961a44dc3c0d2b8c8d94a36873297492e72 /Doc/library
parentcb0a006fd11c06178a656cfdc6390b197b22fc67 (diff)
downloadcpython-2d510e3babab0910fe457cc16e758521332ca1d3.zip
cpython-2d510e3babab0910fe457cc16e758521332ca1d3.tar.gz
cpython-2d510e3babab0910fe457cc16e758521332ca1d3.tar.bz2
Issue #14824: Update Repr.repr_TYPE documentation to use correct name mangling implementation.
Patch by Chris Rebert.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/reprlib.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/reprlib.rst b/Doc/library/reprlib.rst
index 568ac6f..ee68263 100644
--- a/Doc/library/reprlib.rst
+++ b/Doc/library/reprlib.rst
@@ -129,9 +129,9 @@ which format specific object types.
Formatting methods for specific types are implemented as methods with a name
based on the type name. In the method name, **TYPE** is replaced by
- ``string.join(string.split(type(obj).__name__, '_'))``. Dispatch to these
- methods is handled by :meth:`repr1`. Type-specific methods which need to
- recursively format a value should call ``self.repr1(subobj, level - 1)``.
+ ``'_'.join(type(obj).__name__.split())``. Dispatch to these methods is
+ handled by :meth:`repr1`. Type-specific methods which need to recursively
+ format a value should call ``self.repr1(subobj, level - 1)``.
.. _subclassing-reprs: