2014-05-10 14:54:23 +01:00
|
|
|
try:
|
|
|
|
frozenset
|
|
|
|
except NameError:
|
|
|
|
print("SKIP")
|
2017-06-10 18:03:01 +01:00
|
|
|
raise SystemExit
|
2014-05-10 14:54:23 +01:00
|
|
|
|
|
|
|
l = [1, 2, 3, 4]
|
|
|
|
s = frozenset(l)
|
|
|
|
outs = [s.difference(),
|
|
|
|
s.difference(frozenset({1})),
|
|
|
|
s.difference(frozenset({1}), [1, 2]),
|
|
|
|
s.difference(frozenset({1}), {1, 2}, {2, 3})]
|
|
|
|
for out in outs:
|
|
|
|
print(type(out), sorted(out))
|
|
|
|
|
|
|
|
s = frozenset(l)
|
|
|
|
try:
|
|
|
|
print(s.difference_update({1}))
|
|
|
|
except AttributeError:
|
|
|
|
print("AttributeError")
|