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

Method slot_init

crates/vm/src/exceptions.rs:1506–1511  ·  view source on GitHub ↗
(zelf: PyObjectRef, args: FuncArgs, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1504 impl Initializer for PySystemExit {
1505 type Args = FuncArgs;
1506 fn slot_init(zelf: PyObjectRef, args: FuncArgs, vm: &VirtualMachine) -> PyResult<()> {
1507 // Call BaseException_init first (handles args)
1508 PyBaseException::slot_init(zelf, args, vm)
1509 // Note: code is computed dynamically via system_exit_code getter
1510 // so we don't need to set it here explicitly
1511 }
1512
1513 fn init(_zelf: PyRef<Self>, _args: Self::Args, _vm: &VirtualMachine) -> PyResult<()> {
1514 unreachable!("slot_init is defined")

Callers

nothing calls this directly

Calls 15

newFunction · 0.85
swap_removeMethod · 0.80
isMethod · 0.80
try_indexMethod · 0.80
okMethod · 0.80
new_pyobjMethod · 0.80
noneMethod · 0.80
to_vecMethod · 0.80
ErrClass · 0.50
SomeClass · 0.50
checkFunction · 0.50
set_attrMethod · 0.45

Tested by

no test coverage detected