----- Original Message ----- From: "Remi Villatel" <[EMAIL PROTECTED]>
> There is always a "nice" way to do things in Python but this time I can't > find one. > So far, all I got is: > > while True: > some(code) > if final_condition is True: > break > # > # > > What I don't find so "nice" is to have to build an infinite loop only to > break it. If your final_condition is already defined outside the "while" then how about while not final_condition: some(code) Simplistically, this equates to >>> x = 0 >>> while not x == 5: ... x += 1 ... >>> print x 5 :) -- http://mail.python.org/mailman/listinfo/python-list