Hacker News new | ask | show | jobs
by adammarples 748 days ago
Do tuple unpacking like this

result, _* = iterable()

1 comments

That’s not the same though. Your unpacking allows for any non-empty iterable while OPs only allows for an iterable with exactly one item or else it throws an exception.