r/pythontips • • Aug 30 '21

Syntax 7 Levels of Using F-Strings in Python

By this article, I totally understand the F-strings in Python.

36 Upvotes

9 comments sorted by

5

u/FancyASlurpie Aug 30 '21

Seems odd to say some of those things are bug prone...

1

u/AnonymouX47 Sep 25 '21

Can you explain, please? :)

1

u/FancyASlurpie Sep 25 '21

If you use an IDE it will colour code which bits are treated as strings Vs brackets and will highlight mismatched quotes, this seems like it would only be an issue if you were typing directly into a repl or a text file...In which case I'd think the thing that is bug prone is not using developer tools, e.g. mistyping function names would be bug prone as it won't tell you until you run it (and I think that's a silly thing to claim)

0

u/AnonymouX47 Sep 26 '21 edited Sep 26 '21

I see... though, I don't think that's what the writer meant.

Just a parting word...

As much as IDEs help with your development process and workflow, they can't make you a programmer, not to mention a better one.

The fact that the IDE corrects your code or gives highlights to warn you means you made the mistake, not that different from someone who realized the mistake from a SyntaxError when running the program.

In fact, your dependence on the IDE will more likely cause you to make the same mistake over and over again.

Be a good programmer and strive to be a better one :)

Learn intentionally and not by accident.

:)(:

3

u/bbatwork Aug 30 '21

Nice article, thanks!

3

u/jabela Aug 31 '21

Thanks, very good article.

-7

u/benefit_of_mrkite Aug 30 '21

F-strings came out in Python 3.6 which was released in 2016

4

u/eXtc_be Aug 30 '21

your point being?

4

u/benefit_of_mrkite Aug 30 '21

Actually my mistake - thought this was another Python sub