On Mon, Mar 14, 2022 at 9:49 AM Chris Angelico <ros...@gmail.com> wrote:
> On Mon, 14 Mar 2022 at 23:35, <joao.p.f.batista...@gmail.com> wrote: > > > > Currently: > > l = [] # new empty list > > t = () # new empty tuple > > s = set() # new empty set (no clean and consistent way of initializing > regarding the others) <<< > > d = {} # new empty dictionary > > > > Possible solution: > > s = {} # new empty set > > d = {:} # new empty dictionary (the ":" is a reference to key-value > pairs) > > Nope, that would break tons of existing code. Not gonna happen. > Of couse not. (And I mean it). - but what about keeping what exists and adding {,} for an empty set? (it is not that unlike the one-element tuple, which already exists) > > ChrisA > _______________________________________________ > Python-ideas mailing list -- python-ideas@python.org > To unsubscribe send an email to python-ideas-le...@python.org > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/python-ideas@python.org/message/PCPZPHCNXOW6ADAOUXY25MTRDNXI4EQI/ > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/LLS7SPT4XHLDCSHHKK3ZKXTHKA4R2LMV/ Code of Conduct: http://python.org/psf/codeofconduct/