MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / __ixor__

Function __ixor__

lib/sqlalchemy/orm/collections.py:1473–1487  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

1471 return symmetric_difference_update
1472
1473 def __ixor__(fn):
1474 def __ixor__(self, other):
1475 if not _set_binops_check_strict(self, other):
1476 return NotImplemented
1477 want, have = self.symmetric_difference(other), set(self)
1478 remove, add = have - want, want - have
1479
1480 for item in remove:
1481 self.remove(item)
1482 for item in add:
1483 self.add(item)
1484 return self
1485
1486 _tidy(__ixor__)
1487 return __ixor__
1488
1489 l = locals().copy()
1490 l.pop("_tidy")

Callers

nothing calls this directly

Calls 5

_set_binops_check_strictFunction · 0.85
_tidyFunction · 0.85
symmetric_differenceMethod · 0.45
removeMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected