# HG changeset patch # User souliane # Date 1425360267 -3600 # Node ID 2664fe93ceb3c57bbbb8f7cf0d451ab3ab05f8b8 # Parent 267761bf7f0825b6a5b87de437b3cafbc8c04287 browser_side: implements collections.OrderedDict.__contains__ to fix an error while doing "presence in C.PRESENCE" diff -r 267761bf7f08 -r 2664fe93ceb3 src/browser/collections.py --- 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