3 ms·
You can have your IDE indent code in the style you prefer automatically.
by derac 5y ago
You can have your IDE indent code in the style you prefer automatically.
- tonmoy 5y agoI’m looking at diff between two commits right now where someone decided to fix the indentation in a non-Python language. While the new code is very easy to read, the diff is very difficult to analyze.
- vidarh 5y agoDiff can ignore whitespace changes just fine. But also, mixing whitespace fixes with other changes in a commit is a deadly sin.
- indymike 5y ago> You can have your IDE indent code in the style you prefer automatically. If you look at significant whitespace through the lens of developer preference, then sure, it sucks. Where it shines is ensuring code is readable by people other than the guy who likes 320 character long lines, and likes aligning everything to the = sign. The only language I know that is as easy to read as Python is Go, and it does so by forcing developers to use go fmt.
- mixmastamyk 5y agoIndentation instead of brackets in Python was a masterstroke in my opinion. Despite complaints from folks that don't use it much, and therefore run into an issue here and there due to lack of familiarity. As a regular user the tradeoff pays great dividends every single day in readability for years on end. I would remove more punctuation if I could… every single new feature to Python seems to include colons lately. :-/ No, I don't miss brackets everywhere one bit.