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

Method slot_repr

crates/vm/src/types/slot.rs:1787–1792  ·  view source on GitHub ↗
(zelf: &PyObject, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1785 #[inline]
1786 #[pyslot]
1787 fn slot_repr(zelf: &PyObject, vm: &VirtualMachine) -> PyResult<PyRef<PyStr>> {
1788 let zelf = zelf
1789 .downcast_ref()
1790 .ok_or_else(|| vm.new_type_error("unexpected payload for __repr__"))?;
1791 Self::repr(zelf, vm)
1792 }
1793
1794 #[inline]
1795 fn repr(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<PyRef<PyStr>> {

Callers

nothing calls this directly

Implementers 15

js_module.rscrates/wasm/src/js_module.rs
pystruct.rscrates/stdlib/src/pystruct.rs
socket.rscrates/stdlib/src/socket.rs
contextvars.rscrates/stdlib/src/contextvars.rs
_asyncio.rscrates/stdlib/src/_asyncio.rs
mmap.rscrates/stdlib/src/mmap.rs
array.rscrates/stdlib/src/array.rs
hashlib.rscrates/stdlib/src/hashlib.rs
ssl.rscrates/stdlib/src/ssl.rs
cert.rscrates/stdlib/src/openssl/cert.rs
exceptions.rscrates/vm/src/exceptions.rs
_operator.rscrates/vm/src/stdlib/_operator.rs

Calls 3

reprFunction · 0.85
ok_or_elseMethod · 0.80
downcast_refMethod · 0.80

Tested by

no test coverage detected