From 48ec584b5f49160898f3b4bb2c3c511398d6fc8c Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Mon, 1 Jul 2019 02:03:22 +0200 Subject: Simplify eval_string() docstring re. syntax errors Syntax checking has been strict for a long time, so say "if there are syntax errors" instead of "if syntax errors are detected". --- kconfiglib.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'kconfiglib.py') diff --git a/kconfiglib.py b/kconfiglib.py index 58ef8e4..571125b 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -1848,12 +1848,12 @@ class Kconfig(object): def eval_string(self, s): """ Returns the tristate value of the expression 's', represented as 0, 1, - and 2 for n, m, and y, respectively. Raises KconfigError if syntax - errors are detected in 's'. Warns if undefined symbols are referenced. + and 2 for n, m, and y, respectively. Raises KconfigError on syntax + errors. Warns if undefined symbols are referenced. As an example, if FOO and BAR are tristate symbols at least one of - which has the value y, then config.eval_string("y && (FOO || BAR)") - returns 2 (y). + which has the value y, then eval_string("y && (FOO || BAR)") returns + 2 (y). To get the string value of non-bool/tristate symbols, use Symbol.str_value. eval_string() always returns a tristate value, and -- cgit v1.2.3