___
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@python.or
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
On 3/13/22 14:49, 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
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
> Possible solution:
> s = {} # new empty set
> d = {:} # new empty dictionary (the ":" is a reference to key-value pairs)
This would be fine for a new language. But completely out of the question
for Python — it would break an enormous amount of code.
We are in this position because sets are re
Oops, didn’t notice this wasn’t Python-ideas — that’s where it should be.
-CHB
On Sun, Mar 13, 2022 at 3:44 PM Christopher Barker
wrote:
>
> Possible solution:
>> s = {} # new empty set
>> d = {:} # new empty dictionary (the ":" is a reference to key-value pairs)
>
>
> This would be fine for a
On 3/13/2022 5:49 PM, 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 = {:}
> s = {} # new empty set
> d = {:} # new empty dictionary (the ":" is a reference to key-value pairs)
Even though this isn't python-ideas, I just want to suggest having it like this:
s = {,} # new empty set
d = {} # same syntax for new empty dictionary
Instead of the backwards-incompatible change a