Charles-François Natali added the comment: > I don't think that's true in general, or true of how other Python APIs work. > For instance, many APIs return a "file-like object", and you can only do > certain things on that object, depending on what the documentation says, or > what EAFP gets you. Some file-like object don't support seek/tell, some don't > support close, etc. I've seen plenty of walk-like-a-duck checks like this:
Yes, I'm fully aware duck-typing ;-) But here, you're saying that "a duck has a beak, but it *may* have legs, a tail, etc". It's just looks wrong to me on so many levels. Please bring this up on python-dev. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11406> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com