> there is a way to check whether an iterable is a subset of a set or a > > superset of a set but no way to directly ask whether it is equivalent > > to the set.
A_set == set(an_iterable) Seems straightforward to me :-) I see that subset will accept an arbitrary iterable, whereas __eq__ does not— but I think that’s more because there’s no reason for subser and friends NOT to work on an arbitrary iterable than because there’s a compelling reason the should. The same is not true for __eq__. -CHB > > I still don't see what you consider "equivalent" aside from the > equality case. > > Your request would be much more clear and easy to understand if you had > started with concrete examples, especially since the terminology you are > using is ambiguous. > > > -- > Steven > _______________________________________________ > Python-ideas mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/ZWO36MYVIEMBDLXIOU4F77JZDRXWRZOI/ > Code of Conduct: http://python.org/psf/codeofconduct/ > -- Christopher Barker, PhD Python Language Consulting - Teaching - Scientific Software Development - Desktop GUI and Web Development - wxPython, numpy, scipy, Cython
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/3L6KDTSUZZYC2RYBLFBQUH6FQHCX5ODX/ Code of Conduct: http://python.org/psf/codeofconduct/
