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

Method slot_init

crates/vm/src/stdlib/_io.rs:2798–2806  ·  view source on GitHub ↗
(zelf: PyObjectRef, args: FuncArgs, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

2796 }
2797
2798 fn slot_init(zelf: PyObjectRef, args: FuncArgs, vm: &VirtualMachine) -> PyResult<()> {
2799 let zelf_ref: PyRef<Self> = zelf.try_into_value(vm)?;
2800 {
2801 let mut data = zelf_ref.lock_opt(vm)?;
2802 *data = None;
2803 }
2804 let (buffer, text_args): (PyObjectRef, TextIOWrapperArgs) = args.bind(vm)?;
2805 Self::init(zelf_ref, (buffer, text_args), vm)
2806 }
2807 }
2808
2809 impl TextIOWrapper {

Callers

nothing calls this directly

Calls 4

try_into_valueMethod · 0.80
lock_optMethod · 0.80
initFunction · 0.70
bindMethod · 0.45

Tested by

no test coverage detected