Yeah, I think, that’s only really JSON which is so pedantic about it…
Comment on The Perfect Solution
Mastershelf@lemmy.one 10 months ago
TIL Python dictionaries allow trailing commas.
Ephera@lemmy.ml 10 months ago
owenfromcanada@lemmy.world 9 months ago
Yeah…
sweats nervously in C
GBU_28@lemm.ee 10 months ago
List
dalegribble@beehaw.org 10 months ago
While there are not actually any trailing commas in the dictionaries present and you are correct to say the ones present are part of a list, you can also have trailing commas in Python dictionaries. OP might have researched “Python trailing commas” and learned that part.
Trailing commas are fantastic to reduce changed lines in
git
diffs. Makes life much better. Same thing with leading commas in SQL queries.GBU_28@lemm.ee 10 months ago
Yeh