Hacker News new | ask | show | jobs
by johnny_castaway 1518 days ago
This may be also caused by confusing syntax highlighting in some editors, for example in VSCode [1]

The variable in the second string gets highlighted (with slightly different color, but still) because it would still work with `str.format()`. GitHub doesn't seem to do this.

[1] https://imgur.com/a/9KGWVG0

1 comments

Yeah I got bitten by the same-color syntax highlighting a few times.