I was reading a recent bug report where they were going back and forth on this. f-strings were so performant there wasn't much difference between lazy evaluation (not evaluating them) and f-strings. The sticking points seemed to be a) if your f-string variable took unreasonably long to compute or b) if evaluating your variable caused an error.
I get all of these arguments. I see formatting errors so often in error handling code I would much prefer they'd get caught during normal execution. I can't see trusting a heavy query to lazy evaluation...or see it coming up all that often.
I see both sides, but really think using f-strings in logging is the right compromise for Python...but I just don't see them dropping c-style formatting.
I get all of these arguments. I see formatting errors so often in error handling code I would much prefer they'd get caught during normal execution. I can't see trusting a heavy query to lazy evaluation...or see it coming up all that often.
I see both sides, but really think using f-strings in logging is the right compromise for Python...but I just don't see them dropping c-style formatting.