3 ms·
That's exactly it. Although this becomes more complicated because printf-style string formatting is not free (though it's the cheapest of all methods save fstr
by masklinn 5y ago
That's exactly it.
Although this becomes more complicated because printf-style string formatting is not free (though it's the cheapest of all methods save fstrings if I remember correctly), and because python does not support lazy parameters if `foo` is a non-trivial expression odds are good it will far outcost either formatting.