(cls: PyObjectRef, vm: &VirtualMachine)
| 200 | /// Internal ABC helper for class set-up. Should be never used outside abc module. |
| 201 | #[pyfunction] |
| 202 | fn _abc_init(cls: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> { |
| 203 | compute_abstract_methods(&cls, vm)?; |
| 204 | |
| 205 | // Set up inheritance registry |
| 206 | let data = AbcData::new(); |
| 207 | cls.set_attr("_abc_impl", data.to_pyobject(vm), vm)?; |
| 208 | |
| 209 | Ok(()) |
| 210 | } |
| 211 | |
| 212 | /// Internal ABC helper for subclass registration. Should be never used outside abc module. |
| 213 | #[pyfunction] |
no test coverage detected