<html>
<body>
At 02:14 PM 10/24/2007, bob gailer wrote:<br>
<blockquote type=cite class=cite cite="">Dick Moores wrote:<br>
<blockquote type=cite class=cite cite="">Please give me constructive
criticism of
<<a href="http://www.rcblue.com/Python/stopWatchForWeb14-a.py" eudora="autourl">
http://www.rcblue.com/Python/stopWatchForWeb14-a.py</a>><br>
</blockquote>1 - lapCounter is not used.</blockquote><br>
Deleted.<br><br>
<br>
<blockquote type=cite class=cite cite="">2 - simplify:<br><br>
if lapTimeFlag == False:<br>
print "Total Time is", secsToHMS(totalTime)<br>
print "StopWatch is continuing to time.."<br>
else:<br>
currentLapTime = markTime - lapEnd<br>
print "Current time of this lap, Lap %d, is %s" % (lapNum,
secsToHMS(currentLapTime))<br>
print "Total Time is", secsToHMS(totalTime)<br>
print "StopWatch is continuing to time.."<br><br>
new version:<br><br>
if lapTimeFlag:<br>
currentLapTime = markTime - lapEnd<br>
print "Current time of this lap, Lap %d, is %s" % (lapNum,
secsToHMS(currentLapTime))<br>
print "Total Time is", secsToHMS(totalTime)<br>
print "StopWatch is continuing to time.."</blockquote><br>
Thanks. Missed that. <br><br>
I'm wondering about "if lapTimeFlag:". Following "The Zen
of Python", by Tim Peters ("Explicit is better than
implicit"), isn't "if lapTimeFlag == True"
preferable?<br><br>
See the new revision
<<a href="http://www.rcblue.com/Python/stopWatchForWeb14-b.py" eudora="autourl">
http://www.rcblue.com/Python/stopWatchForWeb14-b.py</a>><br><br>
Dick<br>
</body>
</html>