diff options
author | Michael W. Hudson <mwh@python.net> | 2002-03-08 13:40:46 (GMT) |
---|---|---|
committer | Michael W. Hudson <mwh@python.net> | 2002-03-08 13:40:46 (GMT) |
commit | 65a9547384671b1b46187135339adeaf6cc4cae1 (patch) | |
tree | 6a41aaab721d4044bca676f30c61cdd31727321b /Lib | |
parent | 85717c768a2920ae15a39879cb676fe9f5c25f87 (diff) | |
download | cpython-65a9547384671b1b46187135339adeaf6cc4cae1.zip cpython-65a9547384671b1b46187135339adeaf6cc4cae1.tar.gz cpython-65a9547384671b1b46187135339adeaf6cc4cae1.tar.bz2 |
backport montanaro's checkin of
revision 1.58 of pydoc.py
add repr_str as alias for repr_string in both HTMLRepr and TextRepr classes
- reflects the change in type("").__name__ between 2.1 and 2.2. The
__name__ field is used to find a method to call for particular types.
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/pydoc.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py index ab11d00..a90178f 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -311,6 +311,8 @@ class HTMLRepr(Repr): r'<font color="#c040c0">\1</font>', self.escape(testrepr)) + repr_str = repr_string + def repr_instance(self, x, level): try: return self.escape(cram(stripid(repr(x)), self.maxstring)) @@ -860,6 +862,8 @@ class TextRepr(Repr): return 'r' + testrepr[0] + test + testrepr[0] return testrepr + repr_str = repr_string + def repr_instance(self, x, level): try: return cram(stripid(repr(x)), self.maxstring) |