15 May
2018
15 May
'18
11:10 a.m.
On 2018-05-15 04:32, Tim Peters wrote:
Just noting some real code I typed today where `given` works great if it allows unpacking syntax, and assignment expressions don't:
while True: head, matched, s = s.partition(sep) if not matched: break
Using `given`:
while matched given head, matched, s = s.partition(sep):
Typing "matched " twice still sucks, though;-)
[snip] If you're using .partition multiple times, you might as well use .split instead!