You can use a Protocol type for that, makes a lot mote sense than nominal typing for typing use case.
Exactly, sounds like misuse of unions.
Although Python type hints are not expressive enough.
Exactly, sounds like misuse of unions.
Although Python type hints are not expressive enough.