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

Method __enter__

crates/stdlib/src/mmap.rs:1414–1417  ·  view source on GitHub ↗
(zelf: &Py<Self>, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1412
1413 #[pymethod]
1414 fn __enter__(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<PyRef<Self>> {
1415 let _m = zelf.check_valid(vm)?;
1416 Ok(zelf.to_owned())
1417 }
1418
1419 #[pymethod]
1420 fn __exit__(zelf: &Py<Self>, _args: FuncArgs, vm: &VirtualMachine) -> PyResult<()> {

Callers

nothing calls this directly

Calls 2

check_validMethod · 0.80
to_ownedMethod · 0.45

Tested by

no test coverage detected