Missing interfaces in Python...

Mark True darfoo at gmail.com
Tue Apr 18 15:01:35 EDT 2006


This is quite possibly one of the funniest examples of how Duck Typing can
break down that I have ever seen!


On 4/18/06, Rene Pijlman <reply.in.the.newsgroup at my.address.is.invalid>
wrote:
>
> olsongt at verizon.net:
> >If it looks like a duck, and quacks like a duck, then for all practical
> >purposes it supports the 'duck' interface.
>
> The problem with that of course, is that there's much more to being a duck
> than being called 'duck'.
>
> public interface JarFile {
>     void explode();
> }
> public interface NuclearBomb {
>     void explode();
> }
> http://www.beust.com/weblog/archives/000269.html
>
> --
> René Pijlman
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060418/23858d0c/attachment.html>


More information about the Python-list mailing list