News for hackers. Stuff that matters.
Re:PEP 750 – Template Strings (t-strings) have been accepted by theptip on Friday April 11, 2025 @12:37AM (#43650553)

    _log(f”My variable is {x + y}”)
Reads to me a lot more fluently to me than

    _log(“My variable is {}”.format(x+y)) 
or

    _log(“My variable is {z}”.format(z=x+y))
It’s nothing too profound.
Re:PEP 750 – Template Strings (t-strings) have been accepted by blami on Sunday April 13, 2025 @07:30AM (#43671985)
I am not very familiar with Python. How do you localize (translate) first one?
Re:PEP 750 – Template Strings (t-strings) have been accepted by wzdd on Monday April 14, 2025 @10:10PM (#43688358)
You don't with f-strings because they're substituted eagerly. You could with the new t-strings proposed here because you can get at the individual parts.
Re:PEP 750 – Template Strings (t-strings) have been accepted by BiteCode_dev on Monday April 21, 2025 @03:09AM (#43749143)
That's what t-strings are about. They are lazy, so you can mark them for translation "as-is".