Modifying a list during iteration is undefined by the Python documentation and generally inadvisable. Some people (including the 2to3 tool) rely on CPython's behavior for appending during iteration.
x = list(range(10))
for i in x:
if i > 100: break
x.append(i+1)
print len(x)
A regular python list prints 939. With a blist, it prints 39 (as of blist 1.0.2).
Modifying a list during iteration is undefined by the Python documentation and generally inadvisable. Some people (including the 2to3 tool) rely on CPython's behavior for appending during iteration.
A regular python list prints 939. With a blist, it prints 39 (as of blist 1.0.2).