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

Method repr_wtf8

crates/vm/src/builtins/slice.rs:355–369  ·  view source on GitHub ↗
(zelf: &Py<Self>, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

353impl Representable for PySlice {
354 #[inline]
355 fn repr_wtf8(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<Wtf8Buf> {
356 let start_repr = zelf.start_ref(vm).repr(vm)?;
357 let stop_repr = zelf.stop.repr(vm)?;
358 let step_repr = zelf.step_ref(vm).repr(vm)?;
359
360 Ok(wtf8_concat!(
361 "slice(",
362 start_repr.as_wtf8(),
363 ", ",
364 stop_repr.as_wtf8(),
365 ", ",
366 step_repr.as_wtf8(),
367 ")"
368 ))
369 }
370}
371
372#[pyclass(module = false, name = "EllipsisType")]

Callers

nothing calls this directly

Calls 3

start_refMethod · 0.80
step_refMethod · 0.80
reprMethod · 0.45

Tested by

no test coverage detected