diff options
Diffstat (limited to 'TurtleArt/tatype.py')
-rw-r--r-- | TurtleArt/tatype.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/TurtleArt/tatype.py b/TurtleArt/tatype.py index cf75e44..055fc2f 100644 --- a/TurtleArt/tatype.py +++ b/TurtleArt/tatype.py @@ -122,8 +122,10 @@ def get_type(x): if isinstance(x.func, ast.Name): if x.func.id == 'float': return (TYPE_FLOAT, True) - if x.func.id == 'int': + elif x.func.id in ('int', 'ord'): return (TYPE_INT, True) + elif x.func.id == 'chr': + return (TYPE_CHAR, True) elif x.func.id in ('repr', 'str', 'unicode'): return (TYPE_STRING, True) # unary operands never change the type of their argument |