Author Mark.Shannon
Recipients Mark.Shannon, docs@python, eric.snow, rhettinger
Date 2015-07-26.10:41:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I think this is a bug. This is not a normal case of subclassing as the interpreter calls the C API PyDict_XXX() in many cases where a dictionary subclass is passed in.

For example:
class C: pass
c = C()
# Liskov substitution principle says this is OK.
c.__dict__ = OrderedDict() 
c.a = 1

All access to the ordered dict is via the dict.__setitem__ method.

I think this should be documented.
Date User Action Args
2015-07-26 10:41:18Mark.Shannonsetrecipients: + Mark.Shannon, rhettinger, docs@python, eric.snow
2015-07-26 10:41:18Mark.Shannonsetmessageid: <>
2015-07-26 10:41:18Mark.Shannonlinkissue24721 messages
2015-07-26 10:41:18Mark.Shannoncreate