]> mj.ucw.cz Git - eval.git/blobdiff - t/moe/config.py
Minor doc updates and fixes
[eval.git] / t / moe / config.py
index 813976c3980f756bc41306e769b6520d4e0cb523..f24e1ef8f357748b41b13f2b8cff20419cfb90d7 100644 (file)
@@ -1,25 +1,22 @@
 """
 config.py
--------
+---------
 
 Lazy conditional string evaluation module for Moe configuration variables.
 
 
 * Each variable has ordered list of operations (definitions), each defining operation either 
-assigns (SET) or appends (APPEND) value of an expression to the variable. Each operation may be guarded by condition(s). 
-
-NOTE: If no 'SET' applies, a variable is still undefined even if some 'APPEND' applies. This might change.
+  assigns (SET) or appends (APPEND) value of an expression to the variable. Each operation may be guarded by condition(s). 
 
 * Each condition is a formula (tree consisting of 'AND', 'OR', 'NOT' and '==', '!=' between two expressions.
 
 * Expression is a list of strings and variables to be expanded.
 
-NOTE: All expanded data should be (or is converted to) unicode 
-
-
-TODO (OPT): Cleanup of unused undefined variables.
-TODO (OPT): Better variable name checking (no name '.'-structural prefix of another)
-TODO (OPT): Implemet "subtree" listing.
+.. note:: If no 'SET' applies, a variable is still undefined even if some 'APPEND' applies. This might change.
+.. note:: All expanded data should be (or is converted to) unicode 
+.. todo:: (OPT) Cleanup of unused undefined variables.
+.. todo:: (OPT) Better variable name checking (no name '.'-structural prefix of another)
+.. todo:: (OPT) Implemet "subtree" listing.
 """
 
 import types, itertools, re, bisect
@@ -159,9 +156,11 @@ class ConfigElem(object):
 class ConfigCondition(ConfigElem):
   """
   Condition using equality and logic operators.
-  Clause is a tuple-tree in the following recursive form:
-  ('AND', c1, c1), ('OR', c1, c2), ('NOT', c1), 
-  ('==', e1, e2), ('!=', e1, e2) where e1, e2 are `ConfigExpression`s.
+  Clause is a tuple-tree in the following recursive form::
+    
+    ('AND', c1, c1), ('OR', c1, c2), ('NOT', c1), ('==', e1, e2), ('!=', e1, e2) 
+    
+  where e1, e2 are `ConfigExpression`, c1, c2, `ConfigCondition`.
   """
 
   def __init__(self, formula, text=None, parent=None):