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/2006-February/061559.html below:

[Python-Dev] defaultdict proposal round three

[Python-Dev] defaultdict proposal round threeDelaney, Timothy (Tim) tdelaney at avaya.com
Tue Feb 21 03:10:21 CET 2006
"Martin v. Löwis" wrote:

> Delaney, Timothy (Tim) wrote:
>> However, *because* Python uses duck typing, I tend to feel that
>> subclasses in Python *should* be drop-in replacements. If it's not a
>> drop-in replacement, then it should probably not subclass, but just
>> use duck typing (probably by wrapping).
> 
> Inheritance is more about code reuse than about polymorphism.

Oh - it's definitely no hard-and-fast rule. owever, I have found that *usually* people (including myself) only subclass when they want an is-a relationship, whereas duck typing is behaves-like.

In any case, Guido has produced a patch, and the tone of his message sounded like a Pronouncement ...

Tim Delaney
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