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

Method repr_str

crates/vm/src/builtins/complex.rs:509–514  ·  view source on GitHub ↗
(zelf: &Py<Self>, _vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

507impl Representable for PyComplex {
508 #[inline]
509 fn repr_str(zelf: &Py<Self>, _vm: &VirtualMachine) -> PyResult<String> {
510 // TODO: when you fix this, move it to rustpython_common::complex::repr and update
511 // ast/src/unparse.rs + impl Display for Constant in ast/src/constant.rs
512 let Complex64 { re, im } = zelf.value;
513 Ok(rustpython_literal::complex::to_string(re, im))
514 }
515}
516
517#[derive(FromArgs)]

Callers

nothing calls this directly

Calls 1

to_stringFunction · 0.50

Tested by

no test coverage detected