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

Function _abc_init

crates/vm/src/stdlib/_abc.rs:202–210  ·  view source on GitHub ↗
(cls: PyObjectRef, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

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]

Callers 1

__new__Method · 0.90

Calls 4

compute_abstract_methodsFunction · 0.85
newFunction · 0.85
set_attrMethod · 0.45
to_pyobjectMethod · 0.45

Tested by

no test coverage detected