JPDev@programming.dev to Programmer Humor@programming.dev · 6 months agoThe Perfect Solutionprogramming.devimagemessage-square71fedilinkarrow-up1658arrow-down18
arrow-up1650arrow-down1imageThe Perfect Solutionprogramming.devJPDev@programming.dev to Programmer Humor@programming.dev · 6 months agomessage-square71fedilink
minus-squareMastershelf@lemmy.onelinkfedilinkarrow-up9arrow-down1·6 months agoTIL Python dictionaries allow trailing commas.
minus-squarerenzev@lemmy.worldlinkfedilinkarrow-up1·5 months agoPython is so great (half-sarcasm) that a trailing comma on its own constitutes a tuple (immutable list): mytuple = 4, assert len(mytuple) == 1 assert mytuple[0] == 4
minus-squareEphera@lemmy.mllinkfedilinkarrow-up1·6 months agoYeah, I think, that’s only really JSON which is so pedantic about it…
minus-squareowenfromcanada@lemmy.worldlinkfedilinkEnglisharrow-up3·5 months agoYeah… sweats nervously in C
TIL Python dictionaries allow trailing commas.
Python is so great (half-sarcasm) that a trailing comma on its own constitutes a tuple (immutable list):
mytuple = 4, assert len(mytuple) == 1 assert mytuple[0] == 4
Yeah, I think, that’s only really JSON which is so pedantic about it…
Yeah…
sweats nervously in C