Commit 17b45095 authored by Damien George's avatar Damien George
Browse files

tests/basics: Add test constructing a set from a non-trivial expression.

parent 3c582bc7
......@@ -6,6 +6,10 @@ print(s)
s = {3, 4, 3, 1}
print(sorted(s))
# expression in constructor
s = {1 + len(s)}
print(s)
# Sets are not hashable
try:
{s: 1}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment