mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 12:40:15 +01:00
py/objset: Include the failed key in a KeyError raised from set.remove.
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user