Skip to content

#[new] which is also a #[classmethod] #3077

@davidhewitt

Description

@davidhewitt

Discussed in #3075

Originally posted by adriangb March 29, 2023
As far as I can tell, #[new] has to be a static method. It's a classmethod in Python, could it be made the same in PyO3? Context: I'd like to get the class name as seen by Python for the failure case of calling new.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions