3 ms·
What they really want is "pattern matching on interfaces", aka Structural Typing. This is coming to MyPy soon in the form of "protocols": http://mypy.readthedoc
by nerdponx 9y ago
What they really want is "pattern matching on interfaces", aka Structural Typing. This is coming to MyPy soon in the form of "protocols": http://mypy.readthedocs.io/en/latest/class_basics.html http://mypy.readthedocs.io/en/latest/class_basics.html