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

Method __length_hint__

crates/vm/src/builtins/str.rs:330–332  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

328impl PyStrIterator {
329 #[pymethod]
330 fn __length_hint__(&self) -> usize {
331 self.internal.lock().0.length_hint(|obj| obj.char_len())
332 }
333
334 #[pymethod]
335 fn __setstate__(&self, state: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> {

Callers

nothing calls this directly

Calls 3

length_hintMethod · 0.45
lockMethod · 0.45
char_lenMethod · 0.45

Tested by

no test coverage detected