MCPcopy Create free account
hub / github.com/boostorg/build / difference

Function difference

src/util/set.py:10–20  ·  view source on GitHub ↗

Returns the elements of B that are not in A.

(b, a)

Source from the content-addressed store, hash-verified

8
9
10def difference (b, a):
11 """ Returns the elements of B that are not in A.
12 """
13 assert is_iterable(b)
14 assert is_iterable(a)
15 result = []
16 for element in b:
17 if not element in a:
18 result.append (element)
19
20 return result
21
22def intersection (set1, set2):
23 """ Removes from set1 any items which don't appear in set2 and returns the result.

Callers

nothing calls this directly

Calls 2

is_iterableFunction · 0.90
appendMethod · 0.80

Tested by

no test coverage detected