20 Oct
2015
20 Oct
'15
9:40 p.m.
On Wed, Oct 21, 2015 at 5:14 AM, Sven R. Kunze
Not saying that inheritance is a bad thing but to me It seems to me that ordering and default values should be orthogonal aspects of the standard dict.
Just as Sandi described it here: https://www.youtube.com/watch?v=29MAL8pJImQ
Yeah... that video is absolutely correct... for Ruby. In Python, you can use multiple inheritance to do that in the exactly obvious way. class EchoRandomHouse(EchoHouse, RandomHouse): pass When I got to the bit in that video where she says that inheritance paints you into a corner, I went and reimplemented her example code in Python, and it's flawless. It doesn't even matter which order you put the two superclasses, as there's no conflict. ChrisA