681
The Perfect Solution (programming.dev)
you are viewing a single comment's thread
view the rest of the comments
[-] dalegribble@beehaw.org 5 points 11 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 2 points 11 months ago
this post was submitted on 17 Jan 2024
681 points (98.9% liked)

Programmer Humor

19870 readers
27 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS