summaryrefslogtreecommitdiffstats
path: root/Lib/pprint.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2001-11-28 05:49:39 (GMT)
committerBarry Warsaw <barry@python.org>2001-11-28 05:49:39 (GMT)
commit00859c053857437b635ba9e813f46e884f3aecb4 (patch)
tree4bd98eb16c43df18f02fa081756d652001565219 /Lib/pprint.py
parent3072ecdcd28975fa289b5a4b1799b3bf69fefdf2 (diff)
downloadcpython-00859c053857437b635ba9e813f46e884f3aecb4.zip
cpython-00859c053857437b635ba9e813f46e884f3aecb4.tar.gz
cpython-00859c053857437b635ba9e813f46e884f3aecb4.tar.bz2
__format(): Applied SF patch #482003 by Skip to fix multiline dict
output. Patch includes additional test case test_basic_line_wrap(). This patch is a candidate for Python 2.1.2.
Diffstat (limited to 'Lib/pprint.py')
-rw-r--r--Lib/pprint.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/pprint.py b/Lib/pprint.py
index b16fb08..5d178a2 100644
--- a/Lib/pprint.py
+++ b/Lib/pprint.py
@@ -158,7 +158,7 @@ class PrettyPrinter:
if length > 1:
for key, ent in items[1:]:
rep = self.__repr(key, context, level)
- write(',\n%s: %s' % (' '*indent, rep))
+ write(',\n%s%s: ' % (' '*indent, rep))
self.__format(ent, stream, indent + _len(rep) + 2,
allowance + 1, context, level)
indent = indent - self.__indent_per_level