[Python-ideas] Add orderedset as set(iterable, *, ordered=False) and similarly for frozenset.

Chris Angelico rosuav at gmail.com
Sat Feb 7 23:36:48 CET 2015


On Sun, Feb 8, 2015 at 9:22 AM, Ed Kellett <edk141 at gmail.com> wrote:
> On the other hand, set union is commutative, and changing that seems strange
> (and wrong) to me.

Set union is, but sets lack order. Once you add order to a set, it
becomes more like a list, so the union of x and y might not be
identical to the union of y and x. They'd be the same modulo order, so
it's not breaking the concept of set union.

ChrisA


More information about the Python-ideas mailing list