diff options
author | Fred Drake <fdrake@acm.org> | 1997-04-18 13:54:13 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1997-04-18 13:54:13 (GMT) |
commit | 5fd026dc5eb993c703d6f76c5aa0ff81dd1d1753 (patch) | |
tree | 711894d2790bd08e72419e1759319f1a58ea0a44 /Lib | |
parent | f39d0516b44c80fbcdbd7f8058bc2716224c127f (diff) | |
download | cpython-5fd026dc5eb993c703d6f76c5aa0ff81dd1d1753.zip cpython-5fd026dc5eb993c703d6f76c5aa0ff81dd1d1753.tar.gz cpython-5fd026dc5eb993c703d6f76c5aa0ff81dd1d1753.tar.bz2 |
Fix a couple of glitches identified by Greg Stein.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/pprint.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/pprint.py b/Lib/pprint.py index a16edb3..bf5133d 100644 --- a/Lib/pprint.py +++ b/Lib/pprint.py @@ -1,5 +1,3 @@ -# pprint.py -# # Author: Fred L. Drake, Jr. # fdrake@cnri.reston.va.us, fdrake@acm.org # @@ -103,7 +101,7 @@ class PrettyPrinter: level = level + 1 if context.has_key(id(object)): object = _Recursion(object) - rep = self__repr(object, context, level - 1) + rep = self.__repr(object, context, level - 1) objid = id(object) context[objid] = 1 typ = type(object) @@ -115,7 +113,8 @@ class PrettyPrinter: length = len(object) if length: indent = indent + self.__indent_per_level - pprint(object[0], stream, indent, allowance + 1) + self.__format(object[0], stream, indent, allowance + 1, + context, level) if len(object) > 1: for ent in object[1:]: stream.write(',\n' + ' '*indent) |