[Python-checkins] python/dist/src/Lib timeit.py,1.3,1.4

gvanrossum@users.sourceforge.net gvanrossum@users.sourceforge.net
Thu, 06 Mar 2003 05:09:13 -0800


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv4502

Modified Files:
	timeit.py 
Log Message:
Simpler way to write reindent(), suggested by Raymond H.


Index: timeit.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/timeit.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** timeit.py	6 Mar 2003 03:02:10 -0000	1.3
--- timeit.py	6 Mar 2003 13:09:09 -0000	1.4
***************
*** 85,89 ****
  def reindent(src, indent):
      """Helper to reindent a multi-line statement."""
!     return ("\n" + " "*indent).join(src.split("\n"))
  
  class Timer:
--- 85,89 ----
  def reindent(src, indent):
      """Helper to reindent a multi-line statement."""
!     return src.replace("\n", "\n" + " "*indent)
  
  class Timer: