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

random832 at fastmail.us random832 at fastmail.us
Wed Oct 8 05:54:31 CEST 2014


On Tue, Oct 7, 2014, at 21:09, Stephen J. Turnbull wrote:
> But this requires a comparison of the two orders, and "ordering
> relation" is not a type available in the stdlib. 

This has nothing to do with comparable types - the only comparison being
done on the members themselves is equality.

i.e. if the main sequence is [5, 1, 3, 2, 4], it's true for [5, 2, 4]
but not [5, 4, 1].

Think of it as being the question of whether "51234" matches "5.*2.*4"
(it does) or "5.*4.*1" (it does not). But if the argument is a set
instead he wants it to be whether it's a subset rather than a
subsequence.


More information about the Python-ideas mailing list