[Python-ideas] issubclass(collections.OrderedDict, collections.Sequence)

Ed Kellett edk141 at gmail.com
Mon Oct 6 00:05:12 CEST 2014


I think the definition of ordered here would be that the container's
iteration order carries any meaning (compare: dicts and sets' having
iteration order is an incidental effect of one thing having to be
iterated out first, and one shouldn't depend on that order; lists and
ordereddicts' having iteration order is deliberate).

I don't think there's a mathematical definition possible - it's just a
question of whether whoever wrote the class left the iteration order
documented or unspecified.


edk


More information about the Python-ideas mailing list