micropython: add micropython component
This commit is contained in:
16
components/language/micropython/tests/basics/dict_popitem.py
Normal file
16
components/language/micropython/tests/basics/dict_popitem.py
Normal file
@@ -0,0 +1,16 @@
|
||||
els = []
|
||||
d = {1:2,3:4}
|
||||
a = d.popitem()
|
||||
print(len(d))
|
||||
els.append(a)
|
||||
a = d.popitem()
|
||||
print(len(d))
|
||||
els.append(a)
|
||||
try:
|
||||
print(d.popitem(), "!!!",)
|
||||
except KeyError:
|
||||
print("Raised KeyError")
|
||||
else:
|
||||
print("Did not raise KeyError")
|
||||
print(sorted(els))
|
||||
|
Reference in New Issue
Block a user