comparison configmix/__init__.py @ 56:1f11672c4615

Optimize the documentation: make references working with Sphinx using :role:`target`
author Franz Glasner <hg@dom66.de>
date Wed, 28 Feb 2018 00:36:11 +0100
parents aa8345dae995
children 7dfcfc96f533
comparison
equal deleted inserted replaced
55:51a8fa011659 56:1f11672c4615
27 __all__ = ["load", "Configuration"] 27 __all__ = ["load", "Configuration"]
28 28
29 29
30 def load(*files): 30 def load(*files):
31 """Load the given configuration files, merge them in the given order 31 """Load the given configuration files, merge them in the given order
32 and return the resulting `Configuration` dictionary. 32 and return the resulting :class:`configmix.config.Configuration` dictionary.
33 33
34 """ 34 """
35 if not files: 35 if not files:
36 return Configuration() 36 return Configuration()
37 else: 37 else:
97 user[k] = merge(user[k], v, False) 97 user[k] = merge(user[k], v, False)
98 return user 98 return user
99 99
100 100
101 def safe_merge(user, default, _first=True): 101 def safe_merge(user, default, _first=True):
102 """A more safe version of `merge()` that makes shallow copies of 102 """A more safe version of :func:`merge()` that makes shallow copies of
103 the returned container objects. 103 the returned container objects.
104 104
105 .. note:: `_first` is an internal argument. 105 .. note:: `_first` is an internal argument.
106 106
107 """ 107 """