MarcoGorelli/auto-walrus

risky to auto-walrus into while statements

eriknw opened this issue · 3 comments

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.

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

done in version 0.1.8

Very fast, thanks 🎉 (also, neat library :) )