6 ms·
I disagree with 3, a subset is not "less than" the superset. Sets are equatable, but they're not comparable. A named function or a different operator would be p
by cballard 11y ago
I disagree with 3, a subset is not "less than" the superset. Sets are equatable, but they're not comparable. A named function or a different operator would be preferable.
- dragonwriter 11y agoThe set of sets is, itself, a strictly partially ordered set by the "is a proper subset of" relation (and a non-strict partially ordered set by the "is a subset of" relation); if Python's < and > operators are viewed as generic strict ordering operators (and those symbols are, outside of Python, conventionally used for both strict total orders like those on reals and strict partial orders), then their use with sets for the strict partial order defined by the "is a proper subset of" relation is quite natural.