On 1/28/08, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> Please don't reopen this. There are good reasons for 'set' to be the
> default set type and 'frozenset' to appear like a poor cousin. For
> one, their naming. This was all reasoned out long, long ago, in Python
> 2.3 with the sets module.

In general, mutable sets are more useful.

I don't think that applies to the more specific use case of already
having members available when you create the set.

To rephrase:

The majority of uses need a mutable set that starts empty.
The majority of uses that start non-empty do not require mutability.

In fairness, most of the non-empty cases don't require hashability
either, so a mutable set remains an acceptable substitute.  The
question is whether an explicit set( ) around it to indicate
mutability (and the loss of hashability) is desirable.  (Today, we
need the longer frozenset to indicate the opposite, but I'll agree
that we don't need it often.)

-jJ
_______________________________________________
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

Reply via email to