MCPcopy Create free account
hub / github.com/pybind/pybind11 / is

Function is

include/pybind11/pytypes.h:163–163  ·  view source on GitHub ↗

Equivalent to ``obj is other`` in Python.

Source from the content-addressed store, hash-verified

161
162 /// Equivalent to ``obj is other`` in Python.
163 bool is(object_api const &other) const { return derived().ptr() == other.derived().ptr(); }
164 /// Equivalent to ``obj is None`` in Python.
165 bool is_none() const { return derived().ptr() == Py_None; }
166 /// Equivalent to obj == other in Python

Callers

nothing calls this directly

Calls 2

derivedClass · 0.85
ptrMethod · 0.80

Tested by

no test coverage detected