MCPcopy Create free account
hub / github.com/Kitware/CMake / __find_and_remove_value

Function __find_and_remove_value

Source/cmConvertMSBuildXMLToJSON.py:205–217  ·  view source on GitHub ↗

Finds the value in the list that corresponds with the value of compare.

(list, compare)

Source from the content-addressed store, hash-verified

203
204
205def __find_and_remove_value(list, compare):
206 """Finds the value in the list that corresponds with the value of compare."""
207 # next throws if there are no matches
208 try:
209 found = next(value for value in list
210 if value['name'] == compare['name'] and value['switch'] ==
211 compare['switch'])
212 except:
213 return None
214
215 list.remove(found)
216
217 return found
218
219
220def __normalize_switch(switch, separator):

Callers 1

__merge_json_valuesFunction · 0.85

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…