6 ms·
AFAIK Python [optional] type system supports both. The nominal types are the "common" types, while the protocols [1] are structural. It's quite cool, actually :
by ceceron 3y ago
AFAIK Python [optional] type system supports both.
The nominal types are the "common" types, while the protocols [1] are structural. It's quite cool, actually :)
[1] https://peps.python.org/pep-0544/ https://peps.python.org/pep-0544/