[issue24721] The result of calling dict.* methods on OrderedDict is undefined.

2015-07-26 Thread Mark Shannon
Mark Shannon added the comment: 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__

[issue24721] The result of calling dict.* methods on OrderedDict is undefined.

2015-07-25 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> not a bug status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue24721] The result of calling dict.* methods on OrderedDict is undefined.

2015-07-25 Thread Eric Snow
Eric Snow added the comment: Feel free to close this, Raymond. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue24721] The result of calling dict.* methods on OrderedDict is undefined.

2015-07-25 Thread Eric Snow
Eric Snow added the comment: Ah, you're right. I was hung up on issue10977. :) -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue24721] The result of calling dict.* methods on OrderedDict is undefined.

2015-07-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: > This is a consequence of subclassing a builtin type Not really. This is how subclassing works in general. Any time you a user calls a parent class directly on an instance of subclass, they are bypassing whatever the subclass needs to do to maintain its

[issue24721] The result of calling dict.* methods on OrderedDict is undefined.

2015-07-25 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue24721] The result of calling dict.* methods on OrderedDict is undefined.

2015-07-25 Thread Eric Snow
New submission from Eric Snow: (see issue24667) collections.OrderedDict subclasses dict so calling dict's methods on an OrderedDict works. However, neither the pure Python nor the C implementation of OrderedDict was written to support doing so. In fact, both of them currently enter an incon