David Mertz writes: > Even though I was the first person in this thread to suggest > collections.OrderedSet, I'm "meh" about it now. As I read more and played > with the sortedcollections package, it seemed to me that while I might want > a set that iterated in a determinate and meaningful order moderately often, > insertion order would make up a small share of those use cases.
On the other hand, insertion order is one of the most prominent of the determinate meaningful orders where you would have to do ugly things to use "sorted" to get that order. Any application where you have an unreliable message bus feeding a queue (so that you might get duplicate objects but it's bad to process the same object twice) would be a potential application of insertion-ordered sets. Steve _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/ZGSW6MJ4HGHUG65TLWUDHQMZXCW2GR7Q/ Code of Conduct: http://python.org/psf/codeofconduct/