File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -776,23 +776,26 @@ def __repr__(self):
776
776
# When the multiplicities are all zero or one, multiset operations
777
777
# are guaranteed to be equivalent to the corresponding operations
778
778
# for regular sets.
779
+ #
779
780
# Given counter multisets such as:
780
781
# cp = Counter(a=1, b=0, c=1)
781
782
# cq = Counter(c=1, d=0, e=1)
783
+ #
782
784
# The corresponding regular sets would be:
783
785
# sp = {'a', 'c'}
784
786
# sq = {'c', 'e'}
787
+ #
785
788
# All of the following relations would hold:
786
- # set(cp + cq) == sp | sq
787
- # set(cp - cq) == sp - sq
788
- # set(cp | cq) == sp | sq
789
- # set(cp & cq) == sp & sq
790
789
# (cp == cq) == (sp == sq)
791
790
# (cp != cq) == (sp != sq)
792
791
# (cp <= cq) == (sp <= sq)
793
792
# (cp < cq) == (sp < sq)
794
793
# (cp >= cq) == (sp >= sq)
795
794
# (cp > cq) == (sp > sq)
795
+ # set(cp + cq) == sp | sq
796
+ # set(cp - cq) == sp - sq
797
+ # set(cp | cq) == sp | sq
798
+ # set(cp & cq) == sp & sq
796
799
797
800
def __eq__ (self , other ):
798
801
'True if all counts agree. Missing counts are treated as zero.'
You can’t perform that action at this time.
0 commit comments