mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Don't call len() if the value is already cached! Caught by Gerrit
Holl <gerrit.holl@pobox.com>.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user