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

Function has_key

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

Source from the content-addressed store, hash-verified

19namespace zvec {
20
21inline bool has_key(py::dict d, const std::string &key) {
22 return py::bool_(d.contains(key));
23}
24
25template <typename T>
26std::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