[Python-Dev] defaultdict proposal round three (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Tue Feb 21 01:00:32 CET 2006
- Previous message: [Python-Dev] defaultdict proposal round three
- Next message: [Python-Dev] defaultdict proposal round three
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Brett Cannon wrote:
While #3 is my preferred solution as well, it does pose a Liskov violation if this is a direct dict subclass
I'm not sure we should be too worried about that. Inheritance in Python has always been more about implementation than interface, so Liskov doesn't really apply in the same way it does in statically typed languages.
In other words, just because A inherits from B in Python isn't meant to imply that an A is a drop-in replacement for a B.
Greg
- Previous message: [Python-Dev] defaultdict proposal round three
- Next message: [Python-Dev] defaultdict proposal round three
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]