News for hackers. Stuff that matters.
Re:Python 3's F-Strings: An Improved String Formatting Syntax by dragonwriter on Wednesday January 20, 2021 @10:49PM (#25855161)
> Instead of this, f-strings have a lot of hardcoded and often broken behavior which can't be fixed let alone customized

They are customizable on an object-to-be-formatted basis (__format__ special method).

Re:Python 3's F-Strings: An Improved String Formatting Syntax by patrec on Thursday January 21, 2021 @02:42AM (#25856504)
Yes, you can work around some of the defects I mentioned by defining your own wrapper classe(s) and doing something like this:

     f"Article: {fixformatting(somestr):20} Price: {fixformatting(price):5.3}"
Apart from somewhat negating the main advantage of f-strings (relative conciseness) it does not allow you take into account surrounding string context and of course will not fix problems when you have values that contain objects that already have __format__ defined. Also, python being python, you now slowed everything down by an order of magnitude.