]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Minor edit: Improve comment readability and ordering (gh-136557)
authorRaymond Hettinger <rhettinger@users.noreply.github.com>
Fri, 11 Jul 2025 19:36:17 +0000 (12:36 -0700)
committerGitHub <noreply@github.com>
Fri, 11 Jul 2025 19:36:17 +0000 (12:36 -0700)
Lib/collections/__init__.py

index d2ddc1cd9ec2ea2b59462cc22e45d61d01a02629..b8653f40a942f03d70055832b6af9349229524d4 100644 (file)
@@ -776,23 +776,26 @@ class Counter(dict):
     # When the multiplicities are all zero or one, multiset operations
     # are guaranteed to be equivalent to the corresponding operations
     # for regular sets.
+    #
     #     Given counter multisets such as:
     #         cp = Counter(a=1, b=0, c=1)
     #         cq = Counter(c=1, d=0, e=1)
+    #
     #     The corresponding regular sets would be:
     #         sp = {'a', 'c'}
     #         sq = {'c', 'e'}
+    #
     #     All of the following relations would hold:
-    #         set(cp + cq) == sp | sq
-    #         set(cp - cq) == sp - sq
-    #         set(cp | cq) == sp | sq
-    #         set(cp & cq) == sp & sq
     #         (cp == cq) == (sp == sq)
     #         (cp != cq) == (sp != sq)
     #         (cp <= cq) == (sp <= sq)
     #         (cp < cq) == (sp < sq)
     #         (cp >= cq) == (sp >= sq)
     #         (cp > cq) == (sp > sq)
+    #         set(cp + cq) == sp | sq
+    #         set(cp - cq) == sp - sq
+    #         set(cp | cq) == sp | sq
+    #         set(cp & cq) == sp & sq
 
     def __eq__(self, other):
         'True if all counts agree. Missing counts are treated as zero.'