News for hackers. Stuff that matters.
Re:PEP 572: Python assignment expressions has been accepted by bocklund on Tuesday July 03, 2018 @07:57AM (#17449409)
Alternatively

`bar[baz] = bar.get(baz, 0) + 1`

One line and no error checking.

But the OP was probably just illustrating a basic example where you might have some more intense logic

There are no comments on this comment yet.