Skip to content

RFC: replace #[pyclass(subclass)] with #[pyclass(final)] #5826

@davidhewitt

Description

@davidhewitt

Python types are subclassable by default, and use the @typing.final decorator to hint that they should not be subclassed.

We currently use #[pyclass(subclass)] to enable subclassing.

I wonder if we should instead move to #[pyclass(final)] to opt-out of subclassing, to match Python?

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