Is duck-typing misnamed?
cs at zip.com.au
cs at zip.com.au
Sat Aug 27 18:27:50 EDT 2016
On 26Aug2016 19:58, ROGER GRAYDON CHRISTMAN <dvl at psu.edu> wrote:
>"If it walks like a duck, quacks like a duck,... "
>so there is indeed precedence for this so-called 'duck typing'
>
>but wouldn't it be more Pythonic to call this 'witch typing'?
>"How do you know she is a witch?"
>"She looks like one."
>etc.
>
>I do grant that ultimately, the duck does come into play, since the witch
>weighs the same as a duck.
I disagree. 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.
Cheers,
Cameron Simpson <cs at zip.com.au>
More information about the Python-list
mailing list