Thomas Wouters wrote:

> Duck typing isn't "ask the object whether it can do this". Duck typing is
> "do this". I don't believe 'taking different actions based on capabilities'
> is all that common, and it certainly breaks easily.

have you used callable(), or are you just making things up ?

> It may be 'common' for programmers to try and write this kind of code
> (accept either a string or an instance, a sequence or a single object, etc)
> but it's certainly not a common idiom -- idioms don't suck :-)

what widely used API:s have you designed, and what widely used API:s have you
studied when you decided that API:s that use callable to implement duck typing 
all
suck ?

(it actually works a lot better than some people here seem to think, which makes
me think that they've never used it.  generalizing from no examples at all 
isn't a great
way to design software...)

</F> 



_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to