def __eq__(self, other):
try:
return self._value == self._extract_value(other)
- except:
+ except Exception:
return False
def __rmod__(self, other):
def __eq__(self, other):
try:
return self._value == self._value_to_str(other)
- except:
+ except Exception:
return False
def __lt__(self, other):
def __len__(self):
return len(self._value)
+ def __contains__(self, item):
+ return self._value_to_str(item) in self._value
+
def __iadd__(self, value):
curvalue = self._value
curvalue += self._value_to_str(value)
return True
def __len__(self):
- size = native_bt.value_array_get_size(self._ptr)
+ size = native_bt.value_array_get_length(self._ptr)
assert size >= 0
return size