raise TypeError('unorderable types: {}() < {}()'.format(self.__class__.__name__,
other.__class__.__name__))
- return self._value < float(other)
+ return self._value < self._extract_value(other)
def _spec_eq(self, other):
if not isinstance(other, numbers.Number):
return NotImplemented
- return self._value == complex(other)
+ return self._value == self._extract_value(other)
def __rmod__(self, other):
return self._extract_value(other) % self._value
value = property(fset=_set_value)
-class _ArrayField(_ContainerField, _Field):
-
+class _ArrayField(_ContainerField, _Field, collections.abc.MutableSequence):
def _get_length(self):
return native_bt.field_array_get_length(self._ptr)