Kaynağa Gözat

Added TODO to filter_duplicates.

Taddeus Kroes 14 yıl önce
ebeveyn
işleme
e1dd1838d9
1 değiştirilmiş dosya ile 11 ekleme ve 0 silme
  1. 11 0
      src/possibilities.py

+ 11 - 0
src/possibilities.py

@@ -29,6 +29,17 @@ class Possibility(object):
 
 
 def filter_duplicates(items):
+    """
+    Filter duplicated possibilities. Duplicated possibilities occur in n-ary
+    nodes, the root-level node and a lower-level node will both recognize a
+    reqrite possibility within their sscope, whereas only the root-level one
+    matters.
+
+    Example: 1 + 2 + 3
+    The addition of 1 and 2 is recognized bij n-ary additions "1 + 2" and
+    "1 + 2 + 3". The "1 + 2" addition should be removed by this function.
+    """
+    # TODO: Finish according to docstrings
     unique = []
 
     for item in items: