Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter@walter-laptop.(none)>2010-02-12 02:53:05 (GMT)
committer Walter Bender <walter@walter-laptop.(none)>2010-02-12 02:53:05 (GMT)
commit8f5d94c6ecd56e36cfebb7d0599fbfaa80a2b8a0 (patch)
tree8e81e1fb434d8d3797c15044d893ec3e6b2c517c
parentc2648fa911286349d12dbb11b01ef08a677b8901 (diff)
round_int numbers converted to strings
-rw-r--r--talogo.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/talogo.py b/talogo.py
index 9dc2b58..1210d27 100644
--- a/talogo.py
+++ b/talogo.py
@@ -127,7 +127,15 @@ def taplus(x, y):
(type(y) == int or type(y) == float):
return(x+y)
else:
- return(str(x) + str(y))
+ try:
+ xx = round_int(x)
+ except ValueError:
+ xx = x
+ try:
+ yy = round_int(y)
+ except ValueError:
+ yy = y
+ return(str(xx) + str(yy))
def taminus(x, y):
if (type(x) == int or type(x) == float) and \