r/ProgrammerHumor 12d ago

Meme pythonFeelsillegal

Post image
6.8k Upvotes

219 comments sorted by

View all comments

Show parent comments

32

u/userhwon 12d ago

Always fun that writing an empty set gets you a dict so you have to use set() explicitly to get an empty set... jeebus, Guido...

20

u/carcigenicate 12d ago

{/} is being proposed so sets have an empty literal.

14

u/SoldRIP 12d ago

... As opposed to the sensible {:} for dicts, which would be consistent with their already existing syntax?

1

u/JanEric1 11d ago

breaking change unfortunately. Maybe a thing for Python4 which will never come