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

Function file_closed

crates/vm/src/stdlib/_io.rs:30–32  ·  view source on GitHub ↗
(file: &PyObject, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

28pub use _io::{OpenArgs, io_open as open};
29
30fn file_closed(file: &PyObject, vm: &VirtualMachine) -> PyResult<bool> {
31 file.get_attr("closed", vm)?.try_to_bool(vm)
32}
33
34const DEFAULT_BUFFER_SIZE: usize = 128 * 1024;
35

Callers 6

check_closedFunction · 0.85
iobase_closeFunction · 0.85
close_strictMethod · 0.85
closeMethod · 0.85
writeMethod · 0.85
closeMethod · 0.85

Calls 2

try_to_boolMethod · 0.80
get_attrMethod · 0.45

Tested by

no test coverage detected