Created
June 6, 2025 08:46
-
-
Save mypy-play/cff14909230aa0f3fbc1021ac26a535b to your computer and use it in GitHub Desktop.
Shared via mypy Playground
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from enum import Enum | |
from typing import NamedTuple | |
class Foo(NamedTuple): | |
pass | |
class FooEnum(Foo, Enum): | |
ITEM = Foo() | |
foo: Foo = FooEnum.ITEM # works on 1.15 but not 1.16 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment