Conversation
OK, I feel like an absolute noob:

I just spent hours debugging that I left a comma at the end of a #Python assignment, so the value became a tuple instead of the object I wanted 🤦

The library I passed the value to also has very liberal typing so it failed quietly, and the IDE didn't tip me off because I overwrote the value inside a loop...

Extra commas are the new lack of semicolons!

#fail #programming
3
1
0

@buherator seems more like loose typing is the real villain.

1
0
0
@chaos0815 Yeah, it's moments like this when I become nostalgic for strict typing, but part of Pythons power is exactly this kind of flexibility. I could argue for a more strict API/type checking in this particular lib, but I guess this is also something that makes them (very) popular, so I think I just have to be more careful in the future (like building less funky loops)...
0
0
0

@buherator i remember when i was 1st confronted with a bug like this, very high wtf levels. i feel your pain.

0
0
1

@buherator

Don't feel bad; it happens to every Python programmer occasionally. It's a known wart in the language, and the developers have said they wouldn't allow a bare comma if they were creating Python today, but it can't be changed now without breaking backwards compatibility.

0
1
1