MCPcopy Create free account
hub / github.com/alibaba/zvec / has_key

Function has_key

src/binding/python/model/common/python_config.cc:20–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18namespace zvec {
19
20inline bool has_key(py::dict d, const std::string &key) {
21 return py::bool_(d.contains(key));
22}
23
24template <typename T>
25std::optional<T> get_if(py::dict d, const std::string &key) {

Callers 2

get_ifFunction · 0.85
InitializeMethod · 0.85

Calls 1

containsMethod · 0.45

Tested by

no test coverage detected