"Peter Otten" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Andy Dingley wrote:
>
>>>     sorted(setBugsChanged)
>
>> Out of interest, whats the Pythonic way to simply cast (sic) the set to
>> a list, assuming I don't need it sorted?  The list comprehension?
>
> list(setBugsChanged)
>
> Peter

Note that this is not really a "cast" in the C sense of the word. 
list(setBugsChanged) constructs and returns a new list containing the 
elements of setBugsChanges, and leaves setBugsChanged unchanged.

-- Paul 


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to