Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow narrowing enum values using == #11521

Merged
merged 1 commit into from Apr 24, 2023
Merged

Commits on Nov 11, 2021

  1. Allow narrowing enum values using ==

    Resolves python#10915, resolves python#9786
    
    See the discussion in python#10915. I'm sympathetic to the difference between
    identity and equality here being surprising and that mypy doesn't
    usually make concessions to mutability when type checking.
    
    The old test cases are pretty explicit about their intentions and are
    worth reading. Curious to see what people (and mypy-primer) have to say
    about this.
    hauntsaninja committed Nov 11, 2021
    Configuration menu
    Copy the full SHA
    db11aa5 View commit details
    Browse the repository at this point in the history