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

Function register_converter

crates/stdlib/src/_sqlite3.rs:721–728  ·  view source on GitHub ↗
(
        typename: PyStrRef,
        converter: ArgCallable,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

719
720 #[pyfunction]
721 fn register_converter(
722 typename: PyStrRef,
723 converter: ArgCallable,
724 vm: &VirtualMachine,
725 ) -> PyResult<()> {
726 let name = typename.expect_str().to_uppercase();
727 converters().set_item(&name, converter.into(), vm)
728 }
729
730 fn _adapt<F>(obj: &PyObject, proto: PyTypeRef, alt: F, vm: &VirtualMachine) -> PyResult
731 where

Callers 1

Calls 4

convertersFunction · 0.85
to_uppercaseMethod · 0.80
expect_strMethod · 0.80
set_itemMethod · 0.45

Tested by

no test coverage detected