NaN comparisons - Call For Anecdotes

Anders J. Munch 2014 at jmunch.dk
Wed Jul 9 11:05:32 EDT 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