> 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__.


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.

Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-leave@python.org
Message archived at https://mail.python.org/archives/list/python-ideas@python.org/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