This commit is contained in:
commit
568474d52f
1591 files changed
+528213
No files matched your search
@@ -0,0 +1,12 @@
|
||||
# probe: does a Dict iterate in insertion order, and after a pop and re-insert?
|
||||
def main() raises:
|
||||
var d = Dict[Int, String]()
|
||||
d[3] = "c"
|
||||
d[1] = "a"
|
||||
d[2] = "b"
|
||||
for k in d.keys():
|
||||
print(k)
|
||||
_ = d.pop(1)
|
||||
d[1] = "a again"
|
||||
for e in d.items():
|
||||
print(e.key, e.value)
|
||||
Reference in new issue
Block a user