[Python-3000] Builtin iterator type

Mike Orr sluggoster at gmail.com
Tue Nov 14 23:11:48 CET 2006


On 11/14/06, Andrew Koenig <ark-mlist at att.net> wrote:
> > Duck typing is a seriously bad idea
>
> Why?

And more importantly, are we all talking about the same thing when we
say "duck typing"?  Duck typing as I know it means accepting an
argument that exhibits certain behaviors rather than being a certain
type.  It's widely considered to be one of Python's main features
because it's flexible for unforeseen circumstances. Sometimes a better
implementation is found that can't be expressed as a subclass.
Sometimes an object can't be one class because it has to be another,
yet it can still "behave like" the other object.

-- 
Mike Orr <sluggoster at gmail.com>


More information about the Python-3000 mailing list