Re:Python's new t-strings
by a_t48 on Monday April 21, 2025 @01:45PM
(#43754501)
The last three generally shouldn't be used (`+` is sometimes fine, but not really for formatting), but I doubt we would ever get a py4 that removes them, given the stomachaches that py3 caused. It does feel odd that a t-string is just an f-string without args applied.
[ Parent
| on HN ]
Re:Python's new t-strings
by alfalfasprout on Monday April 21, 2025 @04:42PM
(#43756254)
It's my understanding that they're still recommended for logging since with f-strings you always pay the formatting cost (but with str.format it's deferred).