Don't call len() if the value is already cached! Caught by Gerrit
Holl <gerrit.holl@pobox.com>.
This commit is contained in:
parent
8972dfd58e
commit
fbff97a73b
|
@ -141,7 +141,7 @@ class PrettyPrinter:
|
|||
indent = indent + self.__indent_per_level
|
||||
self.__format(object[0], stream, indent, allowance + 1,
|
||||
context, level)
|
||||
if len(object) > 1:
|
||||
if length > 1:
|
||||
for ent in object[1:]:
|
||||
stream.write(',\n' + ' '*indent)
|
||||
self.__format(ent, stream, indent,
|
||||
|
|
Loading…
Reference in New Issue