MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / __iand__

Function __iand__

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

Source from the content-addressed store, hash-verified

1442 return intersection_update
1443
1444 def __iand__(fn):
1445 def __iand__(self, other):
1446 if not _set_binops_check_strict(self, other):
1447 return NotImplemented
1448 want, have = self.intersection(other), set(self)
1449 remove, add = have - want, want - have
1450
1451 for item in remove:
1452 self.remove(item)
1453 for item in add:
1454 self.add(item)
1455 return self
1456
1457 _tidy(__iand__)
1458 return __iand__
1459
1460 def symmetric_difference_update(fn):
1461 def symmetric_difference_update(self, other):

Callers

nothing calls this directly

Calls 5

_set_binops_check_strictFunction · 0.85
_tidyFunction · 0.85
intersectionMethod · 0.45
removeMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected