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

Method __or__

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

Source from the content-addressed store, hash-verified

1612 return NotImplemented
1613
1614 def __or__(self, other):
1615 other_value = self._get_value(other)
1616 if other_value is NotImplemented:
1617 return NotImplemented
1618
1619 for flag in self, other:
1620 if self._get_value(flag) is None:
1621 raise TypeError(f"'{flag}' cannot be combined with other flags with |")
1622 value = self._value_
1623 return self.__class__(value | other_value)
1624
1625 def __and__(self, other):
1626 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