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

Function index

crates/vm/src/stdlib/_operator.rs:89–91  ·  view source on GitHub ↗
(a: PyObjectRef, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

87 // a.__index__ as raised in the issue. Currently, we accept int subclasses.
88 #[pyfunction]
89 fn index(a: PyObjectRef, vm: &VirtualMachine) -> PyResult<PyIntRef> {
90 a.try_index(vm)
91 }
92
93 #[pyfunction]
94 fn invert(pos: PyObjectRef, vm: &VirtualMachine) -> PyResult {

Callers

nothing calls this directly

Calls 1

try_indexMethod · 0.80

Tested by

no test coverage detected