Update guide/src/class.md
Co-authored-by: Bruno Kolenbrander <59372212+mejrs@users.noreply.github.com>
This commit is contained in:
parent
48c90d9586
commit
fc787eabd2
|
@ -339,7 +339,7 @@ impl SubSubClass {
|
|||
}
|
||||
|
||||
#[staticmethod]
|
||||
fn dynamic_type(py: Python<'_>, val: usize) -> PyResult<PyObject> {
|
||||
fn factory_method(py: Python<'_>, val: usize) -> PyResult<PyObject> {
|
||||
let base = PyClassInitializer::from(BaseClass::new());
|
||||
let sub = base.add_subclass(SubClass { val2: val });
|
||||
if val % 2 == 0 {
|
||||
|
|
Loading…
Reference in New Issue