diff options
author | Walter 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) |
commit | 8f5d94c6ecd56e36cfebb7d0599fbfaa80a2b8a0 (patch) | |
tree | 8e81e1fb434d8d3797c15044d893ec3e6b2c517c | |
parent | c2648fa911286349d12dbb11b01ef08a677b8901 (diff) |
round_int numbers converted to strings
-rw-r--r-- | talogo.py | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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 \ |