Skip to content

Strict Mode for "Strict" Equivalence of Literals (type) #170

Open
@rnag

Description

@rnag

As per: Equivalence of two Literals

Two types Literal[v1] and Literal[v2] are equivalent when both of the following conditions are true:
type(v1) == type(v2)
v1 == v2

I would like to update deserialization for typing.Literal in v1 opt-in to account for this.

Perhaps a Meta setting strict_mode_for_literals: bool, or else more simply a strict: bool, can be added to support this feature / enhancement.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions