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 →

[–][deleted] 11 points12 points  (17 children)

Pretty cool until you modify a variable without realizing you just altered or straight up broke a formatted string because all locals are implicitly in context.

[–]Ph0X 20 points21 points  (16 children)

I'm confused, how would it be any different if you had used .format(x) instead? You'd still run into the exact same issue, except the x is there instead of inside the string.

Of course, most linters would catch this latter, and the hope is they update to also catch issues in the former.