On 30 Jan 2008, at 23:17, Greg Ewing wrote:
> Nicko van Someren wrote:
>> Personally I'd like set comprehensions to give me mutable sets,
>> and so I feel set literals should do the same.
>
> Do you really want set comprehensions at all, given that
> set(genexp) exists?
Do we really want set literals at all, given that set(...) exists?
If we are going to have one then, it seems to make sense to have
both. If we are going to have both, I would rather that they generate
the same type of set. I appreciate that set literals can get
optimised at compile time whereas comprehensions can not be optimised
in the same way, and in the case of expressions in round brackets we
get different types when we enclose lists vs. genexps that way, but I
would rather we kept these things as consistent as possible.
Nicko
_______________________________________________
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