[Python-ideas] issubclass(collections.OrderedDict, collections.Sequence)
Raymond Hettinger
raymond.hettinger at gmail.com
Mon Oct 6 03:26:01 CEST 2014
On Oct 5, 2014, at 11:40 AM, Ram Rachum <ram at rachum.com> wrote:
> Why isn't an OrderedDict a Sequence?
Because wasn't designed that way (it doesn't have or need count(), index(), slicing, etc. Nor is it designed in a way that makes any of those operations efficient).
If you want a list, it is simple to make one: s = list(od).
Raymond
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20141005/d44baf60/attachment.html>
More information about the Python-ideas
mailing list