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

Method __and__

Lib/enum.py:1594–1603  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

1592 return self.__class__(value | other_value)
1593
1594 def __and__(self, other):
1595 other_value = self._get_value(other)
1596 if other_value is NotImplemented:
1597 return NotImplemented
1598
1599 for flag in self, other:
1600 if self._get_value(flag) is None:
1601 raise TypeError(f"'{flag}' cannot be combined with other flags with &")
1602 value = self._value_
1603 return self.__class__(value & other_value)
1604
1605 def __xor__(self, other):
1606 other_value = self._get_value(other)

Callers

nothing calls this directly

Calls 2

_get_valueMethod · 0.95
__class__Method · 0.45

Tested by

no test coverage detected