(&self, vm: &VirtualMachine)
| 831 | |
| 832 | impl BufferedData { |
| 833 | fn check_init(&self, vm: &VirtualMachine) -> PyResult<&PyObject> { |
| 834 | if let Some(raw) = &self.raw { |
| 835 | Ok(raw) |
| 836 | } else { |
| 837 | let msg = if self.flags.contains(BufferedFlags::DETACHED) { |
| 838 | "raw stream has been detached" |
| 839 | } else { |
| 840 | "I/O operation on uninitialized object" |
| 841 | }; |
| 842 | Err(vm.new_value_error(msg)) |
| 843 | } |
| 844 | } |
| 845 | |
| 846 | #[inline] |
| 847 | const fn writable(&self) -> bool { |