Python Forum
instructing f-string over format()
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
instructing f-string over format()
#5
I do advice to use f-string,sometime i do comparisons with .foramt() and other time not.
If it not was better i would not have advice so much,but it's more readable and concise,less prone to error than other ways of formatting.
I use f-string in all i do and never .format() anymore.

ichabod801 Wrote:My problem with f-string promotion is that f-strings are fine and dandy if you are not planning on supporting anything before 3.6.
Yes if planing to support < 3.6 then drop the new stuff,also support of only 3.6+ if not a problem these days.
Eg a lot people use Black,and very few complain anymore that's it only 3.6+.
Black Wrote:Black can be installed by running pip install black. It requires Python 3.6.0+ to run but you can reformat Python 2 code with it, too.
Reply


Messages In This Thread
instructing f-string over format() - by metulburr - Jul-13-2019, 12:27 AM
RE: instructing f-string over format() - by snippsat - Jul-13-2019, 08:43 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020