From: Christian Herdtweck Date: Thu, 31 Jan 2019 13:08:22 +0000 (+0100) Subject: Correct doc in simple_cnf X-Git-Tag: v1.4~12^2~9 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=1c21e86239c02272f4d127f8d52754753a8cee16;p=pyi2ncommon Correct doc in simple_cnf --- diff --git a/src/simple_cnf.py b/src/simple_cnf.py index 1538983..84a61dc 100644 --- a/src/simple_cnf.py +++ b/src/simple_cnf.py @@ -41,7 +41,7 @@ provides functions to deal with that hierarchy. Under the hood, all functions here (and probably also in :py:mod:`cnfvar`) work with conf vars represented as dictionaries and lists thereof. Conf var dicts have keys `number`, `varname`, `instance`, `data`, `comment` and possibly `parent` and/or `children`. -`varname` is a regular upper-case string, `data` is a (utf8) string, `comment` +`varname` is a regular lower-case string, `data` is a (utf8) string, `comment` is usually None, `number`, `parent` and `instance` are int. If a conf var has children, then this is a list of conf var dicts. `parent` is only present if a conf-var is a child. Several conf vars, if not wrapped in a @@ -267,7 +267,7 @@ class SimpleCnf(object): Will only check on top level, is not recursive. - :param str varname: name of conf var; will be converted to upper-case + :param str varname: name of conf var; will be converted to lower-case :returns: instance number for which there is no other conf var of same name (0 if there is not other conf var with that name) :rtype: int @@ -283,7 +283,7 @@ class SimpleCnf(object): """ Add a cnf var to config on top level. - :param str varname: name of conf var; only required arg; upper-case + :param str varname: name of conf var; only required arg; case ignored :param str data: conf var's value :param int number: line number of that conf var; if given as None (default) the function looks through config to find @@ -499,7 +499,7 @@ class SimpleCnf(object): users.append_guest_vars(varname='user') :param item: line number or value to specify a cnf subset; - if string value, will be converted to upper case + if string value, will be converted to lower case :type item: int or str :returns: another simple cnf that contains a subset of this simple cnf :rtype: :py:class:`SimpleCnf` @@ -543,7 +543,7 @@ class SimpleCnf(object): cnf.get(line=1121) :param str name: conf var name (key) or None to not use this criterion; - will be converted to upper case + will be converted to lower case :param str value: value of conf var or None to not use this criterion :param int instance: instance number of value in a list (e.g. USERS) or None to not use this criterion