mirror of
https://github.com/erg-lang/erg.git
synced 2025-07-07 21:25:31 +00:00
9 lines
334 B
Python
9 lines
334 B
Python
a = {1, 2, 3, 1, 2, 3} # {1, 2, 3} in no particular order
|
|
assert {1, 2, 3} == {1, 2, 3}
|
|
b = {"a", "a", "b", "b", "a", "b"} # {"a", "b"} in no particular order
|
|
assert {"a", "b"} == {"a", "b"}
|
|
|
|
c: {Int; _} = {-1, 1, -1, 1} # {-1, 1}
|
|
|
|
# If the object does not implement `Eq`, a compile error will occur
|
|
print! {1.0, 1.0} # compile error
|