summaryrefslogtreecommitdiffstats
path: root/Lib/repr.py
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-02-09 08:56:30 (GMT)
committerEric S. Raymond <esr@thyrsus.com>2001-02-09 08:56:30 (GMT)
commit6b71e747b19c41e0665ee14eb755c924a40dd774 (patch)
treeba208a6616870c43672678ad07b772435aef6fa0 /Lib/repr.py
parent141971f22a1269e782b1481779f766629ac83afc (diff)
downloadcpython-6b71e747b19c41e0665ee14eb755c924a40dd774.zip
cpython-6b71e747b19c41e0665ee14eb755c924a40dd774.tar.gz
cpython-6b71e747b19c41e0665ee14eb755c924a40dd774.tar.bz2
String method conversion.
Diffstat (limited to 'Lib/repr.py')
-rw-r--r--Lib/repr.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/repr.py b/Lib/repr.py
index b47ac2a..9f7ed86 100644
--- a/Lib/repr.py
+++ b/Lib/repr.py
@@ -1,7 +1,5 @@
"""Redo the `...` (representation) but with limits on most sizes."""
-import string
-
class Repr:
def __init__(self):
self.maxlevel = 6
@@ -16,8 +14,8 @@ class Repr:
def repr1(self, x, level):
typename = `type(x)`[7:-2] # "<type '......'>"
if ' ' in typename:
- parts = string.split(typename)
- typename = string.joinfields(parts, '_')
+ parts = typename.split()
+ typename = '_'.join(parts)
if hasattr(self, 'repr_' + typename):
return getattr(self, 'repr_' + typename)(x, level)
else: