Mercurial > mamba
changeset 559:4c30776673c6
Don't use 'is' to compare ints -- it's dangerous.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Sat, 08 Oct 2011 20:24:03 +0200 |
parents | 73c4985bf726 |
children | a85993b00fd7 |
files | mamba/engine.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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):