Skip to content

Instantly share code, notes, and snippets.

@mypy-play
Created June 6, 2025 08:46
Show Gist options
  • Save mypy-play/cff14909230aa0f3fbc1021ac26a535b to your computer and use it in GitHub Desktop.
Save mypy-play/cff14909230aa0f3fbc1021ac26a535b to your computer and use it in GitHub Desktop.
Shared via mypy Playground
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