python's OOP question

Neil Cerutti horpner at yahoo.com
Wed Oct 18 06:56:14 EDT 2006


On 2006-10-18, neoedmund <neoedmund at gmail.com> wrote:
> ivestgating the web, i found something similiar with my approch:
> http://en.wikipedia.org/wiki/Duck_typing
> "Duck-typing avoids tests using type() or isinstance(). Instead, it
> typically employs hasattr() tests"

It's pity it didn't get called quack typing. One ckecks if
some unknown noun can quack, not if a duck can do something
unknown.

-- 
Neil Cerutti



More information about the Python-list mailing list