MCPcopy Index your code
hub / github.com/python/cpython / __and__

Method __and__

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

Source from the content-addressed store, hash-verified

1623 return self.__class__(value | other_value)
1624
1625 def __and__(self, other):
1626 other_value = self._get_value(other)
1627 if other_value is NotImplemented:
1628 return NotImplemented
1629
1630 for flag in self, other:
1631 if self._get_value(flag) is None:
1632 raise TypeError(f"'{flag}' cannot be combined with other flags with &")
1633 value = self._value_
1634 return self.__class__(value & other_value)
1635
1636 def __xor__(self, other):
1637 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