On Jan 30, 2008 3:17 PM, Greg Ewing <[EMAIL PROTECTED]> 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?
>
Too late.
>>> {i for i in range(5) }
{0, 1, 2, 3, 4}
>>> {i: "foo" for i in range(5) }
{0: 'foo', 1: 'foo', 2: 'foo', 3: 'foo', 4: 'foo'}
Welcome-to-py3k-ly y'rs,
--
Thomas Wouters <[EMAIL PROTECTED]>
Hi! I'm a .signature virus! copy me into your .signature file to help me
spread!
_______________________________________________
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