Do you really care **more** about sets being unordered than you care about the ability to perform membership testing and to find intersections, unions, set differences etc? That seems odd.

Do you have a use-case for sets that *requires* them to be unordered, one that would break if sets became ordered like dicts are?

Without such a use-case, we can hardly say that lack of order is the most important property of a set.

Mathematically, sets are defined by their properties, of which *membership* is the most fundamental.

It is not correct to define sets as *necessarily lacking order*. Whatever order sets may or may not have is merely not significant, and set operations ignore it. So that the sets {1, 2} and {2, 1} are considered to be equal. When we say that sets are unordered, what we mean is that whatever order they have is *arbitrary*, not that they lack order.

Nor is uniqueness fundamental: we can merely ignore duplicates in a set, or not, as we prefer.

Most people want ordered sets to be like a set, not a stack. The name is a hint

The fundamental (minimal) stack API is two operations, push and pop. It is true that stacks are containers, and hence contain elements, but they do not have the one truly fundamental operation which defines a set, membership testing. The only way to see whether an object is contained by an abstract stack is to pop elements off, one at a time, until either the element is found or the stack is empty.

(Of course implementations of stacks are permitted to support additional operations, e.g. Python stacks are lists and support the entire list API.)

Having an OrderedSet which preserves insertion order, or a SortedSet which preserves lexicographic order of the elements, does not contradict their set-like behaviour any more than dicts cease to be associative arrays or key:value stores merely because they preserve insertion order.