Greg Ewing wrote:
> Do you really want set comprehensions at all, given that
> set(genexp) exists?

For me comprehension are a means to optimize common patterns in the
sense of faster to execute, faster to read and faster to write. Do set
comprehensions occur so often that {item for item in sequence} makes
code both faster and more readable? Or is the speed benefit of a frozen
set literal larger?

Personally I'm more than happy to trade set comprehensions for optimized
frozen set literals. My code has more 'item in fixed_set' than sets. I
can't remember a project where I've used frozenset() instead of a tuple.
 The name is too long.

Christian

_______________________________________________
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