Returns true if the file object's `closed` attribute is truthy.
(&self, file: &PyObject)
| 54 | |
| 55 | /// Returns true if the file object's `closed` attribute is truthy. |
| 56 | fn file_is_closed(&self, file: &PyObject) -> bool { |
| 57 | file.get_attr("closed", self) |
| 58 | .ok() |
| 59 | .is_some_and(|v| v.try_to_bool(self).unwrap_or(false)) |
| 60 | } |
| 61 | |
| 62 | pub(crate) fn flush_std(&self) -> i32 { |
| 63 | let vm = self; |
no test coverage detected