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

Method protocol_length

crates/vm/src/builtins/range.rs:422–426  ·  view source on GitHub ↗
(&self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

420
421impl PyRange {
422 fn protocol_length(&self, vm: &VirtualMachine) -> PyResult<usize> {
423 PyInt::from(self.__len__())
424 .try_to_primitive::<isize>(vm)
425 .map(|x| x as usize)
426 }
427}
428
429impl AsMapping for PyRange {

Callers

nothing calls this directly

Calls 2

mapMethod · 0.45
__len__Method · 0.45

Tested by

no test coverage detected