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

Function open

crates/vm/src/stdlib/_io.rs:4952–4959  ·  view source on GitHub ↗
(args: IoOpenArgs, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

4950
4951 #[pyfunction]
4952 fn open(args: IoOpenArgs, vm: &VirtualMachine) -> PyResult {
4953 io_open(
4954 args.file,
4955 args.mode.as_ref().into_option().map(|s| s.as_str()),
4956 args.opts,
4957 vm,
4958 )
4959 }
4960
4961 #[pyfunction]
4962 fn open_code(file: PyObjectRef, vm: &VirtualMachine) -> PyResult {

Callers 1

initMethod · 0.70

Calls 5

io_openFunction · 0.85
into_optionMethod · 0.80
mapMethod · 0.45
as_refMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected