News for hackers. Stuff that matters.
Re:Python with Braces by mjevans on Sunday July 07, 2024 @05:47PM (#40900701)
go fmt is really nice, that there is A standard for the language which is just included. No more arguments, just do what the including tooling desires.

Python... I'd love if it shipped with a formatter that converted indents to braces, and then had an option for expressing indent as spaces (with number of spaces per indent) OR tabs (same, default 1); then still kept the braces.

Re:Python with Braces by sigzero on Sunday July 07, 2024 @09:20PM (#40901879)
I really hate the "tab width = 8" though.
Re:Python with Braces by moonlion_eth on Monday July 08, 2024 @12:34AM (#40902628)
There are kids out there with tab width 16 you should be grateful
Re:Python with Braces by winocm on Monday July 08, 2024 @07:28AM (#40904427)
And there’s also people who use tabstops of 3.
Re:Python with Braces by arp242 on Monday July 08, 2024 @12:30PM (#40906824)
You can use a tabstop of 4, or 2, or whatever you want. It's not a problem. Don't need to use 8.
Re:Python with Braces by xigoi on Monday July 08, 2024 @05:06PM (#40909708)
But the formatter will still line-break the code as if the tab width was 8, which will lead to lines with several lines of indentation being too short.
Re:Python with Braces by arp242 on Tuesday July 09, 2024 @02:42PM (#40919430)
When does that happen with gofmt?