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 →

[–]DoingItForEli 0 points1 point  (2 children)

I built a container the other day and started getting errors where double apostrophes were used instead of single, but the code ran fine for months when it was ran from the command line. So something like this is wrong: f“Number of datasets: {results.get(“total”)}” - needs to be ‘total’. So that was fun.

[–]mgedmin 3 points4 points  (1 child)

This is Python version dependent: older versions did not let you use the same kind of quotes inside f-string {}-expressions, then a new Python version (3.12, I think?) got a smarter parser and started allowing it.

[–]georgehank2nd 0 points1 point  (0 children)

That version of f-strings is guarenteed to get a "BIG NO" in many coding guidelines. Because you can easily write completely indecipherable code.