py/objset: Include the failed key in a KeyError raised from set.remove.

This commit is contained in:
Damien George
2017-10-03 18:03:06 +11:00
parent 2ac1364688
commit 1394258f37
2 changed files with 3 additions and 3 deletions

View File

@@ -4,8 +4,8 @@ print(s.remove(1))
print(list(s))
try:
print(s.remove(1), "!!!")
except KeyError:
pass
except KeyError as er:
print('KeyError', er.args[0])
else:
print("failed to raise KeyError")