Don't call len() if the value is already cached! Caught by Gerrit

Holl <gerrit.holl@pobox.com>.
This commit is contained in:
Fred Drake 1999-12-22 21:52:32 +00:00
parent 8972dfd58e
commit fbff97a73b
1 changed files with 1 additions and 1 deletions

View File

@ -141,7 +141,7 @@ def __format(self, object, stream, indent, allowance, context, level):
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,