diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2015-06-08 15:45:35 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2015-06-08 15:45:45 +0200 |
| commit | 707170188fe120c95b16806cbb52c39a4107f792 (patch) | |
| tree | 3f6ac6d8005a2857a632b595829309f93d900a26 | |
| parent | b222748f363ec6ae842251ae59754627f3403855 (diff) | |
Move _sym_str_string() to a more logical location.
| -rw-r--r-- | kconfiglib.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index 2d73f24..dc94da5 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -1867,6 +1867,11 @@ def _str_val(obj): symbol), it must be a Symbol.""" return obj if isinstance(obj, str) else obj.get_value() +def _sym_str_string(sym_or_str): + if isinstance(sym_or_str, str): + return '"' + sym_or_str + '"' + return sym_or_str.name + def _intersperse(lst, op): """_expr_to_str() helper. Gets the string representation of each expression in lst and produces a list where op has been inserted between the elements.""" @@ -1894,11 +1899,6 @@ def _intersperse(lst, op): return res -def _sym_str_string(sym_or_str): - if isinstance(sym_or_str, str): - return '"' + sym_or_str + '"' - return sym_or_str.name - def _expr_to_str_rec(expr): if expr is None: return [""] |
