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

Method __xor__

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

Source from the content-addressed store, hash-verified

1634 return self.__class__(value & other_value)
1635
1636 def __xor__(self, other):
1637 other_value = self._get_value(other)
1638 if other_value is NotImplemented:
1639 return NotImplemented
1640
1641 for flag in self, other:
1642 if self._get_value(flag) is None:
1643 raise TypeError(f"'{flag}' cannot be combined with other flags with ^")
1644 value = self._value_
1645 return self.__class__(value ^ other_value)
1646
1647 def __invert__(self):
1648 if self._get_value(self) is None:

Callers

nothing calls this directly

Calls 2

_get_valueMethod · 0.95
__class__Method · 0.45

Tested by

no test coverage detected