Structural Pattern Matching - Literal Sets

It would be a cool addition if match-case would support literal sets:

match {2, 1}:
    case {1, 2}:  # ✘: SyntaxError
        print("Sets are unordered!")

Note that unordered match-case is already implemented for matching dicts:

match {2:0, 1:0}:
    case {1:0, 2:0}:  # ✔
        print("Mappings work!")
4 Likes