Closed berquist closed 4 years ago
@rgabbard From just below https://docs.python.org/3/library/stdtypes.html#frozenset.copy:
Note, the non-operator versions of union(), intersection(), difference(), and
symmetric_difference(), issubset(), and issuperset() methods will accept any
iterable as an argument. In contrast, their operator based counterparts
require their arguments to be sets. This precludes error-prone constructions
like set('abc') & 'cbs' in favor of the more readable
set('abc').intersection('cbs').
Should we follow this convention? Even though our union
doesn't right now
def union(
self, other: AbstractSet[T], check_top_type_matches: Optional[Type[T]] = None
) -> "ImmutableSet[T]":
I think we should.
@berquist : I agree.
issubset
issuperset
|
(formatting problem)^
(automatically done once|
is fixed?)symmetric_difference
(will wrap^
)copy
(shallow)