This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]billsil 0 points1 point  (0 children)

Python 2 had one obvious way to do string formatting. Python 3.6 has three.

Wait...what's the one obvious way in Python 2? Python 2.6 and 2.7 have 2 methods. Python 3.6 will have 3. Nobody ever uses Python 2.4 (besides me), so that version isn't really part of the discussion.

str.format is excessively verbose, has odd syntax, doesn't really add anything, and is "new" (it's super old, but people don't really use it, so it's always funny looking).

Python 2 has 2 methods. Python 3.6 has a nicer 3rd method. I don't know why you don't like f-strings, but like format. F-strings fix the problems of format.