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

Method slot_new

crates/vm/src/stdlib/_typing.rs:71–74  ·  view source on GitHub ↗
(_cls: PyTypeRef, args: FuncArgs, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

69 type Args = ();
70
71 fn slot_new(_cls: PyTypeRef, args: FuncArgs, vm: &VirtualMachine) -> PyResult {
72 let _: () = args.bind(vm)?;
73 Ok(vm.ctx.typing_no_default.clone().into())
74 }
75
76 fn py_new(_cls: &Py<PyType>, _args: Self::Args, _vm: &VirtualMachine) -> PyResult<Self> {
77 unreachable!("NoDefault is a singleton, use slot_new")

Callers

nothing calls this directly

Calls 3

ErrClass · 0.50
bindMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected