logoalt Hacker News

usef-yesterday at 11:57 PM2 repliesview on HN

Every python developer I know uses an auto formatter today, and never needs to think about it (ruff, black). It's not ambiguous and is immediately visible if something has the wrong indent.

(On other projects, I often wish other languages had formatters as good and standard as the Python ecosystem. I have many complaints about Python but whitespace is just not a problem I've seen)


Replies

pjmlptoday at 8:33 AM

Today and forever, I was using ActiveState IDEs back in the day, I started using Python in version 1.6.

Also it isn't the only one, many ML derived languages also use indentation, including the famous F#, Standard ML, OCaml, Haskell,....

dgellowtoday at 12:45 AM

You missed the point. I’m well aware python has formatters, I use them and implemented my own. The point was that when generating/manipulating python code you cannot just generate in whatever format then run a formatter. you need to carefully keep track of the exact indentation at place where the code in written

show 2 replies