News for hackers. Stuff that matters.
Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by CuriouslyC on Sunday July 26, 2026 @08:42AM (#49057568)
The trailing comma rule is to avoid errors when devs copy/paste a line or dump a new line at the end. This matters particularly for arrays in languages with implicit string concatenation, where the missing comma won't trigger a compile error.
Re:Ruff v0.16.0 – Significant new updates – 413 default rule... by mylifeandtimes on Sunday July 26, 2026 @01:02PM (#49060056)
yes, and isn't it funny that

foo=[baz, bar,]

returns a nice list of two items, but if you edit this down and miss the comma,

foo=bar,

is not a scalar.

returning a tuple.

So the trailing comma thing is a thing.