mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
Issue #14824: Update Repr.repr_TYPE documentation to use correct name mangling implementation.
Patch by Chris Rebert.
This commit is contained in:
parent
cb0a006fd1
commit
2d510e3bab
1 changed files with 3 additions and 3 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue