[Python-3000] duck typing
Antoine Pitrou
solipsis at pitrou.net
Sat May 6 14:37:12 CEST 2006
Le samedi 06 mai 2006 à 08:05 -0400, Blake Winton a écrit :
> Bill Janssen wrote:
> > GvR writes:
> >>On 5/5/06, Bill Janssen <janssen at parc.com> wrote:
> >>>>>Is there anywhere else in Python where the type of an object isn't
> >>>>>checkable with isinstance()?
> >>>>Yes, it's called duck typing.
> >>>And, in my opinion, it's probably worth stomping out in Py3K.
> >>You want to get rid of all duck typing? That doesn't sound right to
> >>me. Anyway it isn't enforceable. I must be misunderstanding you.
> > Yes, I meant "get rid of all duck typing". Duck typing is for
> > languages that can't do any better. It's a weakness, not a strength.
If you want a Python-lookalike with strong static typing (and optional
duck typing with the "duck" keyword!), then try Boo:
http://boo.codehaus.org/Home
Regards
Antoine.
More information about the Python-3000
mailing list