projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8972dfd
)
Don't call len() if the value is already cached! Caught by Gerrit
author
Fred Drake
<fdrake@acm.org>
Wed, 22 Dec 1999 21:52:32 +0000
(21:52 +0000)
committer
Fred Drake
<fdrake@acm.org>
Wed, 22 Dec 1999 21:52:32 +0000
(21:52 +0000)
Holl <gerrit.holl@pobox.com>.
Lib/pprint.py
patch
|
blob
|
history
diff --git
a/Lib/pprint.py
b/Lib/pprint.py
index 6704f9b23f71fbcc3adbe346e8fe6310612d29e0..346c70b3c2da193f4fe1b2f630ac08bcb5369304 100644
(file)
--- a/
Lib/pprint.py
+++ b/
Lib/pprint.py
@@
-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 len
gth
> 1:
for ent in object[1:]:
stream.write(',\n' + ' '*indent)
self.__format(ent, stream, indent,