Re:What’s New in Python 3.8
by kolinko on Tuesday October 15, 2019 @07:04AM
(#21257313)
> while s := network_service.read():
> process(s)
Watch out with this one though. In this case it's good, but if you receive numbers from such function, it will break loop not just on None but on 0 as well. Easy to forget.
Watch out with this one though. In this case it's good, but if you receive numbers from such function, it will break loop not just on None but on 0 as well. Easy to forget.
In many cases you'll need to do: