At 01:36 PM 1/4/05 -0500, Jim Fulton wrote:
AKA latent typing or, "if it walks like a duck and quacks like a duck, it must be a duck." Or, more pythonically:
if hasattr(ob,"quack") and hasattr(ob,"duckwalk"): # it's a duck
This is as distinct from both 'if isinstance(ob,Duck)' and 'if implements(ob,IDuck)'. That is, "duck typing" is determining an object's type by inspection of its method/attribute signature rather than by explicit relationship to some type object.