Sebastian Rittau wrote:
Is it a design decision that duck-typing self does not work or is there a technical reason?
There's no technical reason as far as user-defined classes are concerned. I think it was introduced to help catch errors due to making inherited method calls to the wrong class, which can easily happen if you change the base class of a class and forget to update all of the inherited calls to match. I believe this type check has been removed in 3.0, so duck-typing of self is possible there. -- Greg _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com