>That doesn't fix everybody's brain though. Given that sets are much
>less universally useful than dicts I don't think that dict should
>"give in".
>
>
>
>
Right. Changes to the {} notation for empty dicts should be off the
table lest we have a lifetime of regrets. Set literals are not worth
committing atrocities elsewhere in the language.
I think Guido had the best solution. Use set() for empty sets, use {}
for empty dicts, use {genexp} for set comprehensions/displays, use
{1,2,3} for explicit set literals, and use {k1:v1, k2:v2} for dict
literals. We can always add {/} later if demand exceeds distaste.
Also, FWIW, I think the current dict constructor is fine as-is. No
doubt that its API is fully-loaded, but it is very useful and not hard
to learn. Practicality wins here.
Raymond
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com