MCPcopy Index your code
hub / github.com/RustPython/RustPython / __invert__

Method __invert__

Lib/enum.py:1616–1625  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1614 return self.__class__(value ^ other_value)
1615
1616 def __invert__(self):
1617 if self._get_value(self) is None:
1618 raise TypeError(f"'{self}' cannot be inverted")
1619
1620 if self._inverted_ is None:
1621 if self._boundary_ in (EJECT, KEEP):
1622 self._inverted_ = self.__class__(~self._value_)
1623 else:
1624 self._inverted_ = self.__class__(self._singles_mask_ & ~self._value_)
1625 return self._inverted_
1626
1627 __rand__ = __and__
1628 __ror__ = __or__

Callers 1

Calls 2

_get_valueMethod · 0.95
__class__Method · 0.45

Tested by

no test coverage detected