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:
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.
[ Parent
| on HN ]
There are no comments on this comment yet.