DEV Community

Discussion on: Practical Python - Duck-typing to the rescue!

alvarocavalcanti profile image
Alvaro Cavalcanti Author

You points are much appreciated, Ali! Thanks!

I do understand that the title is generic while the content only covers a smaller ground. I'm sorry for that. And to be fair, readability is a first-class concern of mine (I have a much over due unpublished article on the matter), thus the context-through-variable-name.

Also, I thought about using the NamedTuple but wasn't sure about the . accessor (and apparently was too lazy to search) which led me to the duck.