Skip to content

#[staticmethod] in subclass #2978

Answered by davidhewitt
Rexagon asked this question in Questions
Discussion options

You must be logged in to vote

Try

    #[staticmethod]
    fn generate(py: Python) -> PyResult<Py<Self>> {
        ...
        Py::new(py, PyClassInitializer::from(seed).add_subclass(Self))
    }

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Rexagon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2972 on February 22, 2023 19:42.