diff options
author | Walter Bender <walter@walter-laptop.(none)> | 2009-07-22 22:03:46 (GMT) |
---|---|---|
committer | Walter Bender <walter@walter-laptop.(none)> | 2009-07-22 22:03:46 (GMT) |
commit | 3c3b445f71b6b4a31637b6c1045274e4ce7fbc4f (patch) | |
tree | ba47e6fba760eec37fb69635112c90b54cee623f /talogo.py | |
parent | 3244f8d375400b483f23b5d7b83857be00c23943 (diff) |
greater and less
Diffstat (limited to 'talogo.py')
-rw-r--r-- | talogo.py | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -351,9 +351,17 @@ def taequal(x,y): def taless(x,y): try: - return(x<y) + return float(x)<float(y) except: - raise logoerror("#syntaxerror") + if type(x) == str or type(x) == unicode: + xx = ord(x[0]) + else: + xx = x + if type(y) == str or type(y) == unicode: + yy = ord(y[0]) + else: + yy = y + return xx<yy def tamore(x,y): return taless(y,x) |