MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / intersection

Method intersection

lib/sqlalchemy/util/_collections_cy.py:187–189  ·  view source on GitHub ↗
(self, *other: Iterable[Hashable])

Source from the content-addressed store, hash-verified

185
186 # @cython.ccall # cdef function cannot have star argument
187 def intersection(self, *other: Iterable[Hashable]) -> OrderedSet[_T]:
188 other_set: Set[Any] = set.intersection(self, *other)
189 return self._from_list([a for a in self._list if a in other_set])
190
191 def __and__(self, other: AbstractSet[Hashable]) -> OrderedSet[_T]:
192 return self.intersection(other)

Callers 5

__and__Method · 0.95
decorateFunction · 0.45
merge_lists_w_orderingFunction · 0.45
as_interfaceFunction · 0.45

Calls 1

_from_listMethod · 0.95

Tested by 1