Edward Loper <[EMAIL PROTECTED]> wrote:
> 
> I think that a significant motivation for people that propose set 
> literals is that the following is just plain ugly:
> 
>     s = set([1,2,3])
> 
> It seems much more natural to write:
> 
>     s = set(1, 2, 3)

I agree.

> However, it is fairly common to want to build a set from a collection, 
> an iterator, or a genexp.  With the current notation, all three of these 
> are easy.  But with this "more natural" notation, they're no longer 
> possible without resorting to varargs (which would create an unnecessary 
> imtermediary tuple).

Right now you are manually creating an intermediate list or tuple to
pass to set, so this wouldn't seem to be a significant change to me
(it's just an argument semantic addition).

 - Josiah

_______________________________________________
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

Reply via email to