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

Function ungrist

v2/util/utility.py:92–106  ·  view source on GitHub ↗

Returns the value without grist. If value is a sequence, does it for every value and returns the result as a sequence.

(value)

Source from the content-addressed store, hash-verified

90 return [ get_grist_one (v) for v in value ]
91
92def ungrist (value):
93 """ Returns the value without grist.
94 If value is a sequence, does it for every value and returns the result as a sequence.
95 """
96 def ungrist_one (value):
97 stripped = __re_grist_content.match (value)
98 if not stripped:
99 raise BaseException ("in ungrist: '%s' is not of the form <.*>" % value)
100
101 return stripped.group (1)
102
103 if isinstance (value, str):
104 return ungrist_one (value)
105 else:
106 return [ ungrist_one (v) for v in value ]
107
108def replace_suffix (name, new_suffix):
109 """ Replaces the suffix of name by new_suffix.

Callers 5

installFunction · 0.90
get_prefixFunction · 0.90
processMethod · 0.85
format_nameFunction · 0.85
processMethod · 0.85

Calls 1

ungrist_oneFunction · 0.85

Tested by

no test coverage detected