A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-February/086234.html below:

[Python-Dev] Duck-typing self

[Python-Dev] Duck-typing self [Python-Dev] Duck-typing selfGreg Ewing greg.ewing at canterbury.ac.nz
Thu Feb 19 02:39:07 CET 2009
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
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4