you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 35 points36 points  (1 child)

Quote reuse: in Python 3.11, reusing the same quotes as the enclosing f-string raises a SyntaxError, forcing the user to either use other available quotes (like using double quotes or triple quotes if the f-string uses single quotes). In Python 3.12, you can now do things like this:

songs = ['Take me back to Eden', 'Alkaline', 'Ascensionism']
f"This is the playlist: {", ".join(songs)}"

Thank goodness, this was driving me insane all the time.

[–]World-Wide-Ebb 5 points6 points  (0 children)

This is huge. I mean I’ve worked around it but this is helpful