[gedit-plugins/wip/python3: 17/19] Implemented __eq__ for result
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-plugins/wip/python3: 17/19] Implemented __eq__ for result
- Date: Fri, 9 Nov 2012 22:22:52 +0000 (UTC)
commit 69e8f7da735eaedccd493d799238792044671e72
Author: Jesse van den Kieboom <jessevdk gnome org>
Date: Fri Nov 9 11:51:05 2012 +0100
Implemented __eq__ for result
plugins/commander/commander/commands/result.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/plugins/commander/commander/commands/result.py b/plugins/commander/commander/commands/result.py
index 8cc9fc3..c9058a7 100644
--- a/plugins/commander/commander/commands/result.py
+++ b/plugins/commander/commander/commands/result.py
@@ -37,6 +37,12 @@ class Result(object):
else:
return int(self) < other
+ def __eq__(self, other):
+ if isinstance(other, Result):
+ return int(self) == int(other)
+ else:
+ return int(self) == other
+
# Easy shortcuts
HIDE = Result(Result.HIDE)
DONE = Result(Result.DONE)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]