On 2008-01-25, Guido van Rossum wrote: > For the record, I'm thinking Raymond has won this argument fair and > square, and I'm withdrawing my opposition. > > I hope it isn't too confusing that {1: 1} creates a *mutable* dict > while {1} creates an *immutable* frozenset. I still find this slightly > inelegant. But the practicality of being able to treat set literals as > compile-time constants wins me over.
So this will produce: frozenset() # empty frozen set {1} # 1 item frozen set {1, 2} # 2 item frozen set {} # empty dict {1:1} # 1 item dict {1:1, 2:2} # 2 item dict I think this is confusing and messy, especially for new Python programmers. If you're going to make the change, why not make things consistent: {} # empty frozen set {1} # 1 item frozen set {1, 2} # 2 item frozen set {:} # empty dict {1:1} # 1 item dict {1:1, 2:2} # 2 item dict -- Mark Summerfield, Qtrac Ltd., www.qtrac.eu _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com