diff options
Diffstat (limited to 'Lib/repr.py')
-rw-r--r-- | Lib/repr.py | 6 |
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: |