NaN comparisons - Call For Anecdotes

Anders J. Munch 2014 at jmunch.dk
Wed Jul 9 17:05:32 CEST 2014


I wrote:
> | class Monitor(Thread):
> | def run(self):
> | old = self.get_current_value()
> | while not self.Terminated:
> | new = self.get_current_value()
> | if new != old:
> | print(time.asctime(), "changed to", new)
> | old = new
> | time.sleep(1)
>

Huh, I don't know what happened to the identation here, I'l try again:

class Monitor(Thread):
....def run(self):
........old = self.get_current_value()
........while not self.Terminated:
............new = self.get_current_value()
............if new != old:
................print(time.asctime(), "changed to", new)
............old = new
............time.sleep(1)

regards, Anders




More information about the Python-list mailing list