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):
776776 # When the multiplicities are all zero or one, multiset operations
777777 # are guaranteed to be equivalent to the corresponding operations
778778 # for regular sets.
779+ #
779780 # Given counter multisets such as:
780781 # cp = Counter(a=1, b=0, c=1)
781782 # cq = Counter(c=1, d=0, e=1)
783+ #
782784 # The corresponding regular sets would be:
783785 # sp = {'a', 'c'}
784786 # sq = {'c', 'e'}
787+ #
785788 # 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
790789 # (cp == cq) == (sp == sq)
791790 # (cp != cq) == (sp != sq)
792791 # (cp <= cq) == (sp <= sq)
793792 # (cp < cq) == (sp < sq)
794793 # (cp >= cq) == (sp >= sq)
795794 # (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
796799
797800 def __eq__ (self , other ):
798801 'True if all counts agree. Missing counts are treated as zero.'
You can’t perform that action at this time.
0 commit comments