▲ | bcoates 8 days ago | |
The expression (x) is eagerly evaluated in both cases, cuz that's how Python works. You can defer the format call but Python fundamentally doesn't have an equivalent of lazy/compile time flag argument evaluation and this doesn't change that. For a logger t-strings are mostly just a more pleasant and less bug-prone syntax for #2 |