risky to auto-walrus into while statements
eriknw opened this issue · 3 comments
eriknw commented
For example, changing
i = 10
while i > 0:
i -= 1
to
while (i := 10) > 0:
i -= 1
is probably not desirable, since the latter never completes.
MarcoGorelli commented
thanks @eriknw , that's a very good point
not sure what (if anything?) can be done to detect when it's safe or not to rewrite while loops, so I'll remove it
MarcoGorelli commented
done in version 0.1.8
eriknw commented
Very fast, thanks 🎉 (also, neat library :) )