diff configmix/config.py @ 115:a5339d39af5c

Begin the documentation of variables and its expansion
author Franz Glasner <hg@dom66.de>
date Sun, 25 Mar 2018 16:45:15 +0200
parents d9f9a06e0c49
children e2e8d21b4122
line wrap: on
line diff
--- a/configmix/config.py	Sat Mar 24 22:09:44 2018 +0100
+++ b/configmix/config.py	Sun Mar 25 16:45:15 2018 +0200
@@ -55,10 +55,11 @@
     """
 
     def getvar(self, varname, default=_MARKER):
-        """Get a variable of the form ``[[ns1.]ns2.]name`` - including
+        """Get a variable of the form ``[ns:][[key1.]key2.]name`` - including
         variables from other namespaces.
 
         No variable expansion is done and no filters are applied.
+
         """
         varns, varname = self._split_ns(varname)
         try:
@@ -78,7 +79,12 @@
     def getvar_s(self, varname, default=_MARKER):
         """Get a variable - including variables from other namespaces.
 
-        Variables will be substituted recursively in the result.
+        `varname` is interpreted as in :meth:`.getvar`. But variables
+        will be expanded recursively within the variable values and
+        filters are applied.
+
+        For more details see chapter :ref:`variable-expansion`.
+
         """
         try:
             obj = self.getvar(varname)