]> granicus.if.org Git - python/commit
Widespread random code cleanup.
authorTim Peters <tim.peters@gmail.com>
Mon, 8 Oct 2001 06:13:19 +0000 (06:13 +0000)
committerTim Peters <tim.peters@gmail.com>
Mon, 8 Oct 2001 06:13:19 +0000 (06:13 +0000)
commit7d01685738078d4fb89565523145d33eca98d1ec
treeccee53ef74e7cb8714ee2adb38bf7c0a3d949ad7
parent03290ecbf1661c0192e6abdbe00ae163af461d77
Widespread random code cleanup.
Most of this code was old enough to vote.  Examples of cleanups:

+ Backslashes were used for line continuation even inside unclosed
  bracket structures, from back in the days that was still needed.

+ There was no use of % formats, and e.g. the old fpformat module was
  still used to format floats "by hand" in conjunction with rjust().

+ There was even use of a do-nothing .ignore() method to tack on to the
  end of a chain of method calls, else way back when Python would print
  the non-None result (as it does now in an interactive session -- it
  *used* to do that in batch mode too).

+ Perhaps controversial (although I can't imagine why for real <wink>),
  used augmented assignment where helpful.  Stuff like

      self.total_calls = self.total_calls + other.total_calls

  is just plain harder to follow than

      self.total_calls += other.total_calls
Lib/pstats.py