"Alvin A. Delagon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I've been hearing comments that infinite loop is a bad programming
> practice.
What is bad is an *unintended* loop that goobles cpu time while outputting
nothing. Example:
def fact(n):
res = 1
while n != 0:
res *= n
n -= 1
return res
fact(-1)
Now imagine that you are paying $360/hr ($.10/sec) (for IBM mainframe time)
and you should understand the bad reputation (and why jobs were submitted
with a time limit!). ;-)
Terry Jan Reedy
--
http://mail.python.org/mailman/listinfo/python-list