Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarion <marion.zepf@gmail.com>2013-09-02 19:53:02 (GMT)
committer Marion <marion.zepf@gmail.com>2013-09-02 19:53:02 (GMT)
commit670115a0b9dc192ce8544bd922c90111d8088842 (patch)
tree437cf79b2a611b86dede873b6dcb87272776877a
parent3d8e129055cca0d37da256bc3908b600d66028f2 (diff)
update Primitives for the 'and', 'or', and 'not' blocks
-rw-r--r--TurtleArt/tabasics.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/TurtleArt/tabasics.py b/TurtleArt/tabasics.py
index afb9328..5c7604e 100644
--- a/TurtleArt/tabasics.py
+++ b/TurtleArt/tabasics.py
@@ -801,7 +801,9 @@ operators'))
prim_name='not',
logo_command='not',
help_string=_('logical NOT operator'))
- self.tw.lc.def_prim('not', 1, Primitive(Primitive.not_))
+ self.tw.lc.def_prim('not', 1,
+ Primitive(Primitive.not_, return_type=TYPE_BOOL,
+ arg_descs=[ArgSlot(TYPE_BOOL)]))
palette.add_block('and2',
style='boolean-style',
@@ -810,8 +812,9 @@ operators'))
logo_command='and',
special_name=_('and'),
help_string=_('logical AND operator'))
- self.tw.lc.def_prim(
- 'and', 2, Primitive(Primitive.and_))
+ self.tw.lc.def_prim('and', 2,
+ Primitive(Primitive.and_, return_type=TYPE_BOOL,
+ arg_descs=[ArgSlot(TYPE_BOOL), ArgSlot(TYPE_BOOL)]))
palette.add_block('or2',
style='boolean-style',
@@ -820,8 +823,9 @@ operators'))
logo_command='or',
special_name=_('or'),
help_string=_('logical OR operator'))
- self.tw.lc.def_prim(
- 'or', 2, Primitive(Primitive.or_))
+ self.tw.lc.def_prim('or', 2,
+ Primitive(Primitive.or_, return_type=TYPE_BOOL,
+ arg_descs=[ArgSlot(TYPE_BOOL), ArgSlot(TYPE_BOOL)]))
def _flow_palette(self):
''' The basic Turtle Art flow palette '''