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

Function new_wrapper

crates/vm/src/types/slot.rs:622–626  ·  view source on GitHub ↗
(cls: PyTypeRef, mut args: FuncArgs, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

620}
621
622pub(crate) fn new_wrapper(cls: PyTypeRef, mut args: FuncArgs, vm: &VirtualMachine) -> PyResult {
623 let new = cls.get_attr(identifier!(vm, __new__)).unwrap();
624 args.prepend_arg(cls.into());
625 new.call(args, vm)
626}
627
628fn del_wrapper(zelf: &PyObject, vm: &VirtualMachine) -> PyResult<()> {
629 vm.call_special_method(zelf, identifier!(vm, __del__), ())?;

Callers

nothing calls this directly

Calls 4

prepend_argMethod · 0.80
unwrapMethod · 0.45
get_attrMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected