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

Method try_upgrade

crates/vm/src/builtins/weakproxy.rs:78–80  ·  view source on GitHub ↗
(&self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

76))]
77impl PyWeakProxy {
78 fn try_upgrade(&self, vm: &VirtualMachine) -> PyResult {
79 self.weak.upgrade().ok_or_else(|| new_reference_error(vm))
80 }
81
82 #[pymethod]
83 fn __str__(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<PyStrRef> {

Callers 15

__str__Method · 0.45
lenMethod · 0.45
__bytes__Method · 0.45
__reversed__Method · 0.45
__contains__Method · 0.45
getitemMethod · 0.45
setitemMethod · 0.45
delitemMethod · 0.45
iterMethod · 0.45
nextMethod · 0.45
getattroMethod · 0.45
setattroMethod · 0.45

Calls 3

new_reference_errorFunction · 0.85
ok_or_elseMethod · 0.80
upgradeMethod · 0.45

Tested by

no test coverage detected