while m := f(many, args):
# do stuff with m
Now, if you're writing this in Python 3.7, you often end up with some code duplication: m = f(many, args)
while m:
# do stuff with m
m = f(many, args) # duplicate
Or something like this: while True:
m = f(many, args)
if not m:
break
# do stuff with m
Personally, I consider the last version to be the most elegant, but still something of an anti-pattern. So I welcome this new operator.