On Wed, 28 Aug 2013 18:09:22 -0300, Joe Junior wrote: > Of course I don't want to check isistance(), I like duck typing, but > should I check if hasattr() and callable() before adding to the container?
That won't tell you if the object has a quack() method but with incompatible semantics (e.g. wrong number or types of arguments). > What is the pythonic way to deal with it? Ignore it. If you want early type checking, use a statically-typed language. -- http://mail.python.org/mailman/listinfo/python-list