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)

Current workaround at least for consistency:
l = list() # new empty list
t = tuple() # new empty tuple
s = set() # new empty set
d = dict() # new empty dictionary

However, it doesn't feel right to not be able to initialize an empty set as 
cleanly and consistently as lists, tuples and dictionaries in both forms.
_______________________________________________
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/OPWEKLLGT6RWMEHC4SLEZ2LSRVCSS4GP/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to