"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
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