# HG changeset patch # User Simon Cross # Date 1318098243 -7200 # Node ID 4c30776673c670c033f8745ceed32f8ae805c697 # Parent 73c4985bf72610e54bdc8a8da538f9695b738c46 Don't use 'is' to compare ints -- it's dangerous. diff -r 73c4985bf726 -r 4c30776673c6 mamba/engine.py --- a/mamba/engine.py Sun Sep 25 23:32:56 2011 +0200 +++ b/mamba/engine.py Sat Oct 08 20:24:03 2011 +0200 @@ -30,7 +30,7 @@ while True: events = get_events() for ev in events: - if ev.type is QUIT: + if ev.type == QUIT: return elif NewHabitatEvent.matches(ev): self.set_habitat(ev.habitat) @@ -90,7 +90,7 @@ @classmethod def matches(cls, ev): - return ev.type is USEREVENT and ev.utype == cls.TYPE + return ev.type == USEREVENT and ev.utype == cls.TYPE class NewHabitatEvent(UserEvent):