[Python-checkins] CVS: python/dist/src/Lib pprint.py,1.9,1.10

Fred L. Drake fdrake@weyr.cnri.reston.va.us
Wed, 22 Dec 1999 16:52:35 -0500 (EST)


Update of /projects/cvsroot/python/dist/src/Lib
In directory weyr:/home/fdrake/projects/python/Lib

Modified Files:
	pprint.py 
Log Message:

Don't call len() if the value is already cached!  Caught by Gerrit
Holl <gerrit.holl@pobox.com>.


Index: pprint.py
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Lib/pprint.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** pprint.py	1999/09/02 15:09:44	1.9
--- pprint.py	1999/12/22 21:52:32	1.10
***************
*** 142,146 ****
                  self.__format(object[0], stream, indent, allowance + 1,
                                context, level)
!                 if len(object) > 1:
                      for ent in object[1:]:
                          stream.write(',\n' + ' '*indent)
--- 142,146 ----
                  self.__format(object[0], stream, indent, allowance + 1,
                                context, level)
!                 if length > 1:
                      for ent in object[1:]:
                          stream.write(',\n' + ' '*indent)