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

Method unwrap_or_none

crates/vm/src/vm/vm_object.rs:106–108  ·  view source on GitHub ↗
(&self, obj: Option<PyObjectRef>)

Source from the content-addressed store, hash-verified

104 if self.is_none(&obj) { None } else { Some(obj) }
105 }
106 pub fn unwrap_or_none(&self, obj: Option<PyObjectRef>) -> PyObjectRef {
107 obj.unwrap_or_else(|| self.ctx.none())
108 }
109
110 pub fn call_get_descriptor_specific(
111 &self,

Callers 15

throwMethod · 0.45
get_attrMethod · 0.45
do_splitFunction · 0.45
groupsMethod · 0.45
throwMethod · 0.45
slot_initMethod · 0.45
execute_instructionMethod · 0.45
_unwrapMethod · 0.45
exitFunction · 0.45
py_newMethod · 0.45
fromkeysMethod · 0.45
getMethod · 0.45

Calls 1

noneMethod · 0.80

Tested by

no test coverage detected