We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30cf503 commit 05c70fdCopy full SHA for 05c70fd
tests/basics/set_binop.py
@@ -29,6 +29,25 @@
29
30
print(set('abc') == 1)
31
32
+# make sure inplace operators modify the set
33
+
34
+s1 = s2 = set('abc')
35
+s1 |= set('ad')
36
+print(s1 is s2, len(s1))
37
38
39
+s1 ^= set('ad')
40
41
42
43
+s1 &= set('ad')
44
45
46
47
+s1 -= set('ad')
48
49
50
+# unsupported operator
51
try:
52
set('abc') * 2
53
except TypeError:
0 commit comments