[Python-Dev] Re: An unambiguous way of initializing an empty dictionary and set

2022-03-13 Thread joao . p . f . batista . 97
Thanks! ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@py

[Python-Dev] An unambiguous way of initializing an empty dictionary and set

2022-03-13 Thread joao . p . f . batista . 97
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