summaryrefslogtreecommitdiff
path: root/kconfiglib.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2017-10-30 01:31:35 +0100
committerUlf Magnusson <ulfalizer@gmail.com>2017-10-30 01:31:35 +0100
commitf08c676d10945d0055024f943d171458b278bb71 (patch)
tree7c149e3e5449c13dee7d526449e9f5020f8ce546 /kconfiglib.py
parent989e9f77cfe8caabc7ac241572e9b52682901135 (diff)
Fix outdated set_value() documentation
Not worthwhile to confuse the API by allowing strings for bool/tristate. Things works out nicely anyway with the other updated APIs.
Diffstat (limited to 'kconfiglib.py')
-rw-r--r--kconfiglib.py19
1 files changed, 8 insertions, 11 deletions
diff --git a/kconfiglib.py b/kconfiglib.py
index 96a421c..7921798 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -901,7 +901,7 @@ class Kconfig(object):
def _next_line(self):
"""
Returns the next line in the current file, or the empty string at EOF
- (like the standard readline() function)
+ (like the standard readline() function).
"""
# This provides a single line of "unget" if _reuse_line is set to True
if not self._reuse_line:
@@ -919,7 +919,7 @@ class Kconfig(object):
def _next_line_no_join(self):
"""
- Used for help texts, which don't do line joining
+ Used for help texts, which don't do line joining.
"""
self._line = self._file.readline()
self._linenr += 1
@@ -2450,15 +2450,12 @@ class Symbol(object):
automatically recalculated to reflect the assigned value.
value:
- The user value to give to the symbol.
-
- A a convenience, set_value() accepts both 0/1/2 (plain python
- integers) and "n"/"m"/"y" as the the format of the 'value' argument
- for bool and tristate symbols. This was added so that 'assignable'
- could return integers (which are easier to work with) while at the
- same time being able to assign a value from 'assignable' without an
- ugly conversion. Accepting strings for all symbols streamlines
- .config handling.
+ The user value to give to the symbol. For bool and tristate symbols,
+ pass 0, 1, 2 for n, m, and y, respectively. For other symbol types,
+ pass a string.
+
+ A warning will be printed by default if the value is not valid for
+ the symbol's type.
"""
self._set_value_no_invalidate(value, False)