From 03d5530b18a5410864d707c372be2a7eb0ce911c Mon Sep 17 00:00:00 2001 From: Marion Date: Sun, 01 Sep 2013 15:53:49 +0000 Subject: new Type: 'bool', cannot be converted to any other Types - The different shapes of docks for booleans and other values disallow conversion anyway. --- (limited to 'TurtleArt/tatype.py') diff --git a/TurtleArt/tatype.py b/TurtleArt/tatype.py index 14f1c9e..fdf7659 100644 --- a/TurtleArt/tatype.py +++ b/TurtleArt/tatype.py @@ -53,12 +53,13 @@ class TypeDisjunction(tuple,Type): TYPE_OBJECT = Type('object', 0) +TYPE_BOOL = Type('bool', 5) TYPE_CHAR = Type('char', 1) TYPE_COLOR = Type('color', 2) TYPE_FLOAT = Type('float', 3) TYPE_INT = Type('int', 4) -TYPE_NUMBER = Type('number', 6) # shortcut to avoid a TypeDisjunction between -# TYPE_FLOAT and TYPE_INT +TYPE_NUMBER = Type('number', 6) # shortcut to avoid a TypeDisjunction + # between TYPE_FLOAT and TYPE_INT TYPE_NUMERIC_STRING = Type('numeric string', 7) TYPE_STRING = Type('string', 9) # TODO add list types -- cgit v0.9.1