-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Having a look at #3 it seems the main benefit compared to functools.singledispatch is the ability to work on structural types.
Therefore I wonder if one can define a hierarchy of protocols via python-typeclasses and have them checked with mypy as well ?
These days I find myself wanting to use haskell concepts in my python code (that I want to keep for the prototyping/iterative development feel) and I guess I actually want to replace nominal typing in my code with structural types + strict dynamic typing, but I am not quite sure how to go about it.
I've been wanting for a while to attempt to implement typeclasses (metaclasses were my initial take), so I'm happy to find this, thanks.
Metadata
Metadata
Assignees
Labels
No labels