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

Method repr

crates/vm/src/types/slot.rs:1795–1798  ·  view source on GitHub ↗
(zelf: &Py<Self>, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1793
1794 #[inline]
1795 fn repr(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<PyRef<PyStr>> {
1796 let repr = Self::repr_wtf8(zelf, vm)?;
1797 Ok(vm.ctx.new_str(repr))
1798 }
1799
1800 fn repr_wtf8(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<Wtf8Buf> {
1801 Self::repr_str(zelf, vm).map(|utf8| utf8.into())

Callers 4

slot_reprMethod · 0.45
slot_initMethod · 0.45
slot_callMethod · 0.45
slot_iterMethod · 0.45

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 1

new_strMethod · 0.45

Tested by

no test coverage detected