# HG changeset patch # User Franz Glasner # Date 1637283582 -3600 # Node ID b45403d175a03ca222e3522cced2019dfdf8b8c7 # Parent b1f82b8532907fe34b20b80dc2fdf430451177af Docs diff -r b1f82b853290 -r b45403d175a0 configmix/config.py --- a/configmix/config.py Fri Nov 19 01:39:18 2021 +0100 +++ b/configmix/config.py Fri Nov 19 01:59:42 2021 +0100 @@ -652,11 +652,19 @@ return ''.join(res) def jailed(self, rootpath=None, root=None): - """Return a "jailed" configuration. + """Return a "jailed" configuration of the current configuration. + :param rootpath: a sequence of strings that shall emcompass + the chroot-like jail of the returned + configuration + :type rootpath: list or tuple + :param str root: a string path expression that shall encompass + the chroot-like jail of the returned configuration :return: a jailed (aka restricted) configuration :rtype: _JailedConfiguration + Exactly one of `rootpath` or `root` must be given. + """ if rootpath is not None and root is not None: raise ValueError("only one of `rootpath' or `root' can be given") @@ -680,7 +688,19 @@ """A jailed and restricted variant of :class:`Configuration`. - No namespace support. + Restriction is two-fold: + + - The access to configuration variables in `config` is restricted + to the configuration sub-tree that is configured in `path`. + + - Not all access-methods of :class:`Configuration` are implemented + yet. + + .. note:: There is no namespace support. + + .. note:: Do not call the constructor directly. Instantiate a jailed + configuration from the parent configuration's + :meth:`~.Configuration.jailed` factory method. """