summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2002-03-07 22:58:02 (GMT)
committerSkip Montanaro <skip@pobox.com>2002-03-07 22:58:02 (GMT)
commitdf708788b6a0b06b0eaf07173b760ea80ffce87b (patch)
treed630a4bd88790dfcdb9ad635a64c81f803fa4aaa /Lib/pydoc.py
parent70ffddf8af51c826e9dd7af857d15787f4863ba0 (diff)
downloadcpython-df708788b6a0b06b0eaf07173b760ea80ffce87b.zip
cpython-df708788b6a0b06b0eaf07173b760ea80ffce87b.tar.gz
cpython-df708788b6a0b06b0eaf07173b760ea80ffce87b.tar.bz2
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/pydoc.py')
-rwxr-xr-xLib/pydoc.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index b878486..5b27a09 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)