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

Method str_utf8

crates/vm/src/protocol/object.rs:384–386  ·  view source on GitHub ↗
(&self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

382 }
383
384 pub fn str_utf8(&self, vm: &VirtualMachine) -> PyResult<PyRef<PyUtf8Str>> {
385 self.str(vm)?.try_into_utf8(vm)
386 }
387 pub fn str(&self, vm: &VirtualMachine) -> PyResult<PyRef<PyStr>> {
388 let obj = match self.to_owned().downcast_exact::<PyStr>(vm) {
389 Ok(s) => return Ok(s.into_pyref()),

Callers 3

__str__Method · 0.80
typing_type_reprFunction · 0.80
repr_strMethod · 0.80

Calls 2

try_into_utf8Method · 0.80
strMethod · 0.45

Tested by

no test coverage detected