diff options
Diffstat (limited to 'kconfiglib.py')
| -rw-r--r-- | kconfiglib.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index 6b6eff6..c9d015f 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -1993,13 +1993,16 @@ class Symbol(object): when printing the symbol. str_value: - The value of the symbol as a string. Gives the string value for - string/int/hex symbols. For bool/tristate symbols, gives "n", "m", or - "y". + The value of the symbol as a string. Gives the value for string/int/hex + symbols. For bool/tristate symbols, gives "n", "m", or "y". This is the symbol value that's used in relational expressions (A = B, A != B, etc.) + Gotcha: For int/hex symbols, the exact format of the value must often be + preserved (e.g., when writing a .config file), hence why you can't get it + directly as an int. Do int(sym.str_value) to get the integer value. + tri_value: The tristate value of the symbol as an integer. One of 0, 1, 2, representing n, m, y. Always 0 (n) for non-bool/tristate symbols. |
