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

Function _xoptions

crates/vm/src/stdlib/sys.rs:740–751  ·  view source on GitHub ↗
(vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

738
739 #[pyattr]
740 fn _xoptions(vm: &VirtualMachine) -> PyDictRef {
741 let ctx = &vm.ctx;
742 let xopts = ctx.new_dict();
743 for (key, value) in &vm.state.config.settings.xoptions {
744 let value = value.as_ref().map_or_else(
745 || ctx.new_bool(true).into(),
746 |s| ctx.new_str(s.clone()).into(),
747 );
748 xopts.set_item(&**key, value, vm).unwrap();
749 }
750 xopts
751 }
752
753 #[pyattr]
754 fn warnoptions(vm: &VirtualMachine) -> Vec<PyObjectRef> {

Callers

nothing calls this directly

Calls 7

new_dictMethod · 0.80
as_refMethod · 0.45
new_boolMethod · 0.45
new_strMethod · 0.45
cloneMethod · 0.45
unwrapMethod · 0.45
set_itemMethod · 0.45

Tested by

no test coverage detected