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

Method hex

crates/vm/src/builtins/memory.rs:741–749  ·  view source on GitHub ↗
(
        &self,
        sep: OptionalArg<Either<PyStrRef, PyBytesRef>>,
        bytes_per_sep: OptionalArg<isize>,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

739
740 #[pymethod]
741 fn hex(
742 &self,
743 sep: OptionalArg<Either<PyStrRef, PyBytesRef>>,
744 bytes_per_sep: OptionalArg<isize>,
745 vm: &VirtualMachine,
746 ) -> PyResult<String> {
747 self.try_not_released(vm)?;
748 self.contiguous_or_collect(|x| bytes_to_hex(x, sep, bytes_per_sep, vm))
749 }
750
751 #[pymethod]
752 fn count(&self, value: PyObjectRef, vm: &VirtualMachine) -> PyResult<usize> {

Callers

nothing calls this directly

Calls 3

bytes_to_hexFunction · 0.85
try_not_releasedMethod · 0.80
contiguous_or_collectMethod · 0.45

Tested by

no test coverage detected