summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tonkadur.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tonkadur.py b/tonkadur.py
index b20b1bd..afae903 100644
--- a/tonkadur.py
+++ b/tonkadur.py
@@ -84,7 +84,11 @@ class Tonkadur:
content = self.compute(computation['content'])
if (target_type == "string"):
- return str(content)
+ if (origin_type == "bool"):
+ # Python would return True and False by default.
+ return "true" if content else "false"
+ else:
+ return str(content)
elif (target_type == "float"):
return float(content)
elif (target_type == "bool"):