Jeffrey Schwab wrote: > class Loop: > def __init__(self, n): > self.n = n > def __call__(self): > self.n = self.n - 1 > return self.n != 0 > > > if __name__ == '__main__': > loop = Loop(10) > while loop:
Whoops. Should be "while loop()". > print "OK" -- http://mail.python.org/mailman/listinfo/python-list