<br><br><div class="gmail_quote">On Jan 30, 2008 3:17 PM, Greg Ewing <<a href="mailto:greg.ewing@canterbury.ac.nz">greg.ewing@canterbury.ac.nz</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Nicko van Someren wrote:<br>> Personally I'd like set comprehensions to give me mutable<br>> sets, and so I feel set literals should do the same.<br><br></div>Do you really want set comprehensions at all, given that<br>
set(genexp) exists?<br></blockquote><div><br>Too late.<br><br>>>> {i for i in range(5) }<br>{0, 1, 2, 3, 4}
<br>>>> {i: "foo" for i in range(5) }<br>{0: 'foo', 1: 'foo', 2: 'foo', 3: 'foo', 4: 'foo'}<br><br>Welcome-to-py3k-ly y'rs,<br><br></div></div>-- <br>Thomas Wouters <<a href="mailto:thomas@python.org">thomas@python.org</a>><br>
<br>Hi! I'm a .signature virus! copy me into your .signature file to help me spread!