>> Of course dicts and sets are sequences.  But there are also sequences
>> on which len doesn't work.
> 
> That was my intuition, too. But Python takes a different stance:

It's a sequence if it can be indexed by numbers in range(len(seq)).
Neither dicts nor sets can be indexed that way.

Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to