(ctx: &Context)
| 5197 | } |
| 5198 | |
| 5199 | fn create_unsupported_operation(ctx: &Context) -> PyTypeRef { |
| 5200 | use crate::builtins::type_::PyAttributes; |
| 5201 | use crate::types::PyTypeSlots; |
| 5202 | |
| 5203 | let mut attrs = PyAttributes::default(); |
| 5204 | attrs.insert(identifier!(ctx, __module__), ctx.new_str("io").into()); |
| 5205 | |
| 5206 | PyType::new_heap( |
| 5207 | "UnsupportedOperation", |
| 5208 | vec![ |
| 5209 | ctx.exceptions.os_error.to_owned(), |
| 5210 | ctx.exceptions.value_error.to_owned(), |
| 5211 | ], |
| 5212 | attrs, |
| 5213 | PyTypeSlots::heap_default(), |
| 5214 | ctx.types.type_type.to_owned(), |
| 5215 | ctx, |
| 5216 | ) |
| 5217 | .unwrap() |
| 5218 | } |
| 5219 | |
| 5220 | pub fn unsupported_operation() -> &'static Py<PyType> { |
| 5221 | rustpython_common::static_cell! { |
no test coverage detected