Is duck-typing misnamed?

Ben Finney ben+python at benfinney.id.au
Sat Aug 27 20:26:32 EDT 2016


cs at zip.com.au writes:

> They want to burn her because she's supposedly a witch, but the
> scientific test was that she weighed as much as a duck. So I think
> your second example is also duck typing: functioning like a duck.

Excellent reasoning!

(Also, I agree that describing objects with “looks like a witch” brings
repressive social context, both historical and present-day, that should
not be encouraged. I'd prefer that the Python community refrain from
that.)

Let's stick to the term “duck typing”.

-- 
 \          “Any sufficiently advanced bug is indistinguishable from a |
  `\                                          feature.” —Rich Kulawiec |
_o__)                                                                  |
Ben Finney




More information about the Python-list mailing list