Inconsistent documentation for `set.issubset` vs `set.isdisjoint`.
Hello, In the set documentation https://docs.python.org/3.7/library/stdtypes.html#set, it is mentioned: Note, the non-operator versions of union(), intersection(), difference(),
and symmetric_difference(), issubset(), and issuperset() methods will accept any iterable as an argument.
Through some trial, it seems that `isdisjoint() https://docs.python.org/3.7/library/stdtypes.html#frozenset.isdisjoint` also accepts any iterable as an argument; however, there is no mention of this in the documentation. The documentation seems to imply that `isdisjoint()` would only accept a set as an argument: set.disjoing(other) Return True if the set has no elements in common with other. Sets are
disjoint if and only if their intersection is the empty set.
Perhaps, `isdisjoint()` should be added to the list of set functions which are documented as accepting any iterable as an argument: Note, the non-operator versions of union(), intersection(), difference(),
and symmetric_difference(),* isdisjioint()*, issubset(), and issuperset() methods will accept any iterable as an argument.
Best, Jose
participants (1)
-
Jose Ville