Closed as not planned
Description
When the size of a dict
changes while it is iterated over, we get a RuntimeError
. But this is not the case on lists. For instance, the following code will loop until it exhausts memory:
seq = list(range(10))
for s in seq:
seq.append(s)
Same situation with this code:
seq = list(range(10))
seq.extend(s for s in seq)
I would have expected such a corner case to be detected.