Can you imagine how many billions of time this code has been executed? I love software like this.
Honestly, excessive cleverness does not generally pass code review @ Google. Especially something that would get this many eyes.
But it being old and critical, I'd also be wary of major changes.
I imagine these days it’s been incredibly hardened and is additionally sandboxed. But back in the day?
And yet the Google style guide literally says: "Assume the person reading the code knows Python better than you do."
https://github.com/google/styleguide/blob/gh-pages/pyguide.m...
If you're going to have to explain it at the next code review, you should comment it now. Complicated operations get a few lines of comments before the operations commence. Non-obvious ones get comments at the end of the line.
The section you're quoting says:
On the other hand, never describe the code. Assume the person reading the code knows Python (though not what you're trying to do) better than you do.
By "clever code" we're talking about weird unidiomatic tricks and hacks that maybe writes things in a slightly shorter or in a fractionally more (unnecessarily) optimised way, and makes you feel clever, but makes it harder and more time consuming for anyone else to understand what your code is doing, or verify that it's actually doing what it's supposed to.