changeset 661:2664fe93ceb3 frontends_multi_profiles

browser_side: implements collections.OrderedDict.__contains__ to fix an error while doing "presence in C.PRESENCE"
author souliane <souliane@mailoo.org>
date Tue, 03 Mar 2015 06:24:27 +0100
parents 267761bf7f08
children ebb602d8b3f2
files src/browser/collections.py
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/browser/collections.py	Fri Feb 27 22:53:27 2015 +0100
+++ b/src/browser/collections.py	Tue Mar 03 06:24:27 2015 +0100
@@ -43,6 +43,9 @@
         del self.__internal_dict[key]
         self.__keys.remove(key)
 
+    def __contains__(self, key):
+        return key in self.__keys
+
     def clear(self):
         self.__internal_dict.clear()
         del self.__keys[:]
@@ -132,11 +135,11 @@
             raise KeyError(args[0])
         self.__keys.remove(args[0])
 
-    def viewitems():
+    def viewitems(self):
         raise NotImplementedError
 
-    def viewkeys():
+    def viewkeys(self):
         raise NotImplementedError
 
-    def viewvalues():
+    def viewvalues(self):
         raise NotImplementedError