mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
__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.
This commit is contained in:
parent
3072ecdcd2
commit
00859c0538
2 changed files with 20 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue