On Thu, 2007-04-12 at 14:10 +0000, Antoon Pardon wrote: > People are always defending duck-typing in this news group and now python > has chosen to choose the option that makes duck-typing more difficult.
Au contraire! The "inconsistent" behavior of "in" is precisely what duck-typing is all about: Making the operator behave in a way that makes sense in its context. Nobody seems to be complaining about "+" behaving "inconsistently" depending on whether you're adding numbers or sequences. -Carsten -- http://mail.python.org/mailman/listinfo/python-list