Python Protocols

In my article Python Type Checking I wrote about type hints. Type hints are around the block since Python 3.5. Python 3.7 introduced another interesting concept to make Python code even more type safe: Protocols Duck typing If it walks like a duck and it quacks like a duck, then it must be a duck…