Skip to content

Support | and |= operators for TypedDict #2951

@erictraut

Description

@erictraut

The _TypedDict class definition in typing.pyi was recently amended to include support for __or__ and __ior__ methods. This implies that | and |= operators should work for TypedDict instances. Pyright currently rejects these.

This is a tracking bug. For the original, see microsoft/pylance-release#2300.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions