def getvalue(self, value): """returns a value, evaluating strings as neccessary""" if (value.startswith("'") and value.endswith("'")) or (value.startswith('"') and value.endswith('"')): return sparse.stringeval(value) else: return value