MCPcopy Create free account
hub / github.com/MegEngine/MegFlow / __len__

Method __len__

flow-message/src/cross/python/map.rs:16–18  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

14#[pyproto]
15impl PyMappingProtocol for PyMap {
16 fn __len__(&self) -> usize {
17 self.as_ref().len()
18 }
19 fn __setitem__(&mut self, attr: String, value: PyObject) -> PyResult<()> {
20 let gil = Python::acquire_gil();
21 let py = gil.python();

Callers

nothing calls this directly

Calls 2

as_refMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected