Skip to content

Protocols: A utility to copy attributes from other types? #607

@funkyfuture

Description

@funkyfuture

is there a way to derive a Protocol based type from another class, so all attributes and their type annotations are declared, but may be overriden in the class body. a typical use-case would be to derive from Dict whose interface is imitated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: featureDiscussions about new features for Python's type annotations

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions