On Thu, Sep 18, 2014 at 9:55 PM, cool-RR <ram.rac...@gmail.com> wrote: > My function gets an iterable of an unknown type. I want to check whether it's > ordered. I could check whether it's a `set` or `frozenset`, which would cover > many cases, but I wonder if I can do better. Is there a nicer way to check > whether an iterable is ordered or not? >
An iterable is always ordered. You call next() and you get the next value. Are you asking if there's a way to find out if the order matters? Not easily. What's your use-case? Why do you need to know? Also, you're still using Google Groups, which means your formatting is b0rked. Please can you use something better, or else look into fixing this. ChrisA -- https://mail.python.org/mailman/listinfo/python-list