In production code, if I ever have clever one-liners, they're usually offset with just as many additional lines of comments to explain what it's doing and why it works. Plus, this function is generic and would probably be extracted into a utility module, anyway.
To your point, though, this one is pretty esoteric.
To your point, though, this one is pretty esoteric.