3 ms·
Do you have an example of bad code you'd expect people to use assignment expressions and f-strings for? I don't think I've come across any f-string abuse in th
by duckerude 7y ago
Do you have an example of bad code you'd expect people to use assignment expressions and f-strings for?
I don't think I've come across any f-string abuse in the wild so far, and my tentative impression is that there's a few patterns that are improved by assignment expressions and little temptation to use them for evil.
It helps that the iteration protocol is deeply ingrained in the language. A lot of code that could use assignment expressions in principle already has a for loop as the equally compact established idiom.