Skip to content

Instantly share code, notes, and snippets.

@mypy-play
Created September 23, 2025 17:58
Show Gist options
  • Select an option

  • Save mypy-play/eed8c069d307071718ae2692366f2136 to your computer and use it in GitHub Desktop.

Select an option

Save mypy-play/eed8c069d307071718ae2692366f2136 to your computer and use it in GitHub Desktop.
Shared via mypy Playground
from typing import TypeVar, Generic
class GameNode(Generic['GameNodeType']):
pass
GameNodeType = TypeVar('GameNodeType', bound=GameNode, default=GameNode)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment