The '..' operator is the flip-flop operator in perl. (It is rarely used.) It is exactly the same as the 'range' type operator. It returns false until the first condition is met, then it returns true until the last condition met, then it returns false.
You could create a flip-flop with a python closure (t_cond and f_cond are functions that take a value and return True of False) def make_flip_flop(t_cond, f_cond): state = [False] def flip_flop(val): if state[0] and f_cond(val): state[0] = False elif not state[0] and t_cond(val): state[0] = True return state[0] return flip_flop -- http://mail.python.org/mailman/listinfo/python-list