WPS332 prohibits the use of the walrus operator (:=) outside of comprehensions, but I think it could be allowed for the while loop too. Example:
while something := fetch_something(offset, limit, filters):
DO_WORK
I think it looks clear and as readable as the standard while loop code.
while True:
something = fetch_something(offset, limit, filters)
if not something:
break
DO_WORK
WPS332 prohibits the use of the walrus operator (:=) outside of comprehensions, but I think it could be allowed for the while loop too. Example:
I think it looks clear and as readable as the standard while loop code.