> Ian Bicking:
> Instead you get set([2, 3, 5, 7]), which is much less attractive and
> introduces an unneeded intermediate data structure.  Or set((2, 3, 5,
> 7))... which is typographically prettier, but probably more confusing to
> a newbie.
>
> Generator comprehensions + dict() were a nice alternative to dict
> comprehension, and also replace the need for set comprehension.  I feel
> like there might be some clever way to constructing sets?  Not that
> there's any direct relation to generator expressions that I can see, but
> maybe something in the same vein.

One of the reasons I'd like native syntax for sets is that I'd like set
comprehensions:

    a = {b for b in c where b > 0}

may not quite be as beautiful as using epsilon for membership (sorry, Alex
;-), but it's still quite nice.

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