On Jan 25, 2008 12:18 AM, Mark Summerfield <[EMAIL PROTECTED]> wrote: > 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
This has been discussed and rejected as it would break too much code. Check the archives during the set literals discussions. STeVe -- I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a tiny blip on the distant coast of sanity. --- Bucky Katt, Get Fuzzy _______________________________________________ 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