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

Function to_seq

v2/util/utility.py:19–30  ·  view source on GitHub ↗

If value is a sequence, returns it. If it is a string, returns a sequence with value as its sole element.

(value)

Source from the content-addressed store, hash-verified

17__re_backslash = re.compile (r'\\')
18
19def to_seq (value):
20 """ If value is a sequence, returns it.
21 If it is a string, returns a sequence with value as its sole element.
22 """
23 if not value:
24 return []
25
26 if isinstance (value, str):
27 return [value]
28
29 else:
30 return value
31
32def replace_references_by_objects (manager, refs):
33 objs = []

Callers 5

initFunction · 0.90
initFunction · 0.90
containsFunction · 0.90
globFunction · 0.90
initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected