On Jan 24, 2008 9:12 PM, Guido van Rossum <[EMAIL PROTECTED]> 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. > > (I suspect for a 2-element set of ints or strings, translating "x in > {C1, C2}" into "x in (C1, C2)" might actually be a slight win since > probing a tuple must be much faster than probing a set; but that's a > detail.)
Given that "x in {1,2,3}" can be optimized just as well with mutable sets (can somebody think of an example that can't?), do you still support immutable using the literal notation? -- Adam Olsen, aka Rhamphoryncus _______________________________________________ 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