On Mon, Mar 14, 2022 at 8:33 AM <[email protected]> wrote:
> Possible solution:
> s = {} # new empty set
> d = {:} # new empty dictionary (the ":" is a reference to key-value pairs)
>
I have suggested over the years—as have probably dozens of other people
(maybe thousands)—that that would be a great spelling if Python were a
brand new language. But in reality, Python is 30+ years old, and billions
of lines of code use `{}` as an empty dict.
Historically, Python had dictionaries before it had sets, so there was more
than a decade in there where sets were not a thing you could spell at all.
A breaking change isn't something that's going to happen here.
--
Keeping medicines from the bloodstreams of the sick; food
from the bellies of the hungry; books from the hands of the
uneducated; technology from the underdeveloped; and putting
advocates of freedom in prisons. Intellectual property is
to the 21st century what the slave trade was to the 16th.
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/7U4MOQ4O46MMJO6OA34ZGML7X2WRVFR3/
Code of Conduct: http://python.org/psf/codeofconduct/