Skip to content

Commit 17b4509

Browse files
committed
tests/basics: Add test constructing a set from a non-trivial expression.
1 parent 3c582bc commit 17b4509

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/basics/set1.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
s = {3, 4, 3, 1}
77
print(sorted(s))
88

9+
# expression in constructor
10+
s = {1 + len(s)}
11+
print(s)
12+
913
# Sets are not hashable
1014
try:
1115
{s: 1}

0 commit comments

Comments
 (0)