On Thu, 07 May 2009 11:40:57 -0700, Chris Rebert wrote:

>> why is the printed result of
>>
>>>>> basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'}
>>>>> print(basket)
>> {'orange', 'banana', 'pear', 'apple'}
>>
>> in the sequence given?
> 
> Because it's *not a sequence* at all, it's a set. 

[pedant]

But the *printed output* is a sequence. It's a sequence of characters. 
The OP doesn't claim that basket is a sequence-type, he is using 
"sequence" in a generic, plain English way.

[/pedant]

I agree with the rest of your explanation about arbitrary ordering of 
sets :)



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

Reply via email to