From 707170188fe120c95b16806cbb52c39a4107f792 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Mon, 8 Jun 2015 15:45:35 +0200 Subject: Move _sym_str_string() to a more logical location. --- kconfiglib.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'kconfiglib.py') 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 [""] -- cgit v1.2.3