r/ProgrammerHumor 2d ago

Meme pythonFeelsillegal

Post image
6.7k Upvotes

219 comments sorted by

View all comments

Show parent comments

31

u/userhwon 2d 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...

21

u/carcigenicate 2d ago

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

14

u/SoldRIP 2d ago

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

24

u/NewbornMuse 2d ago

And what, change the meaning of {} from dict to set? I don't think breaking changes like that are anywhere in python's future.

3

u/minecon1776 1d ago

Python 4