MCPcopy Index your code
hub / github.com/RustPython/RustPython / length_hint

Method length_hint

crates/vm/src/protocol/object.rs:55–57  ·  view source on GitHub ↗
(self, defaultvalue: usize, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

53 }
54
55 pub fn length_hint(self, defaultvalue: usize, vm: &VirtualMachine) -> PyResult<usize> {
56 Ok(vm.length_hint_opt(self)?.unwrap_or(defaultvalue))
57 }
58
59 // PyObject *PyObject_Dir(PyObject *o)
60 pub fn dir(self, vm: &VirtualMachine) -> PyResult<PyList> {

Callers

nothing calls this directly

Calls 1

length_hint_optMethod · 0.80

Tested by

no test coverage detected