Skip to content

Clarify the implications of subclassing Any #1747

Closed as not planned
Closed as not planned
@carljm

Description

@carljm

The typing spec says

Any can also be used as a base class. This can be useful for avoiding type checker errors with classes that can duck type anywhere or are highly dynamic.

But this leaves some cases unclear. The unclear cases are described in https://discuss.python.org/t/take-2-rules-for-subclassing-any/47981

One possible solution was explored in #1672, but rejected due to issues uncovered in https://discuss.python.org/t/take-2-rules-for-subclassing-any/47981/19

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions