diff Lib/pprint.py @ 47797:016166b7b976 legacy-trunk

Fixed issue #2888. Now the behaviour of pprint when working with nested structures follows the common sense (and works like in 2.5 and 3.0).
author Facundo Batista <facundobatista@gmail.com>
date Sat, 21 Jun 2008 17:43:56 +0000
parents 07a53bb82baa
children 751c6dd71b5e
line wrap: on
line diff
--- a/Lib/pprint.py	Sat Jun 21 17:30:06 2008 +0000
+++ b/Lib/pprint.py	Sat Jun 21 17:43:56 2008 +0000
@@ -194,7 +194,7 @@
             else:
                 write('(')
                 endchar = ')'
-            if self._indent_per_level > 1:
+            if self._indent_per_level > 1 and sepLines:
                 write((self._indent_per_level - 1) * ' ')
             if length:
                 context[objid] = 1