MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / repr

Method repr

src/objectprotocol.rs:177–179  ·  view source on GitHub ↗
(&self, py: Python)

Source from the content-addressed store, hash-verified

175 /// This is equivalent to the Python expression 'repr(self)'.
176 #[inline]
177 fn repr(&self, py: Python) -> PyResult<PyString> {
178 unsafe { err::result_cast_from_owned_ptr(py, ffi::PyObject_Repr(self.as_ptr())) }
179 }
180
181 /// Compute the string representation of self.
182 /// This is equivalent to the Python expression 'str(self)'.

Callers 3

fmtMethod · 0.80
variant_seedMethod · 0.80
fmtMethod · 0.80

Implementers 1

objectprotocol.rssrc/objectprotocol.rs

Calls 2

as_ptrMethod · 0.45

Tested by

no test coverage detected