2 ms·
For doing "duck-typing" formally, you need Interfaces or Protocols, rather than checking from a shortlist of allowed types. Here's a blog post [1] from this di
by stevesimmons 6y ago
For doing "duck-typing" formally, you need Interfaces or Protocols, rather than checking from a shortlist of allowed types.
Here's a blog post [1] from this discussion on Django 3.2 [2] 10 days ago.
[1] https://glyph.twistedmatrix.com/2021/03/interfaces-and-protocols.html https://glyph.twistedmatrix.com/2021/03/interfaces-and-proto...
[2] https://news.ycombinator.com/item?id=26710013 https://news.ycombinator.com/item?id=26710013