Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt/taprimitive.py
diff options
context:
space:
mode:
Diffstat (limited to 'TurtleArt/taprimitive.py')
-rw-r--r--TurtleArt/taprimitive.py17
1 files changed, 3 insertions, 14 deletions
diff --git a/TurtleArt/taprimitive.py b/TurtleArt/taprimitive.py
index 8c52f51..36ad49c 100644
--- a/TurtleArt/taprimitive.py
+++ b/TurtleArt/taprimitive.py
@@ -262,7 +262,7 @@ class Primitive(object):
new_prim = self.fill_slots(runtime_args, runtime_kwargs,
convert_to_ast=False)
if not new_prim.are_slots_filled():
- raise logoerror('not enough arguments') # TODO find correct error message
+ raise logoerror("#syntaxerror")
if Primitive._DEBUG:
debug_output(" new_prim.arg_descs: " + repr(new_prim.arg_descs))
@@ -308,7 +308,7 @@ class Primitive(object):
debug_output(" arg_asts: " + repr(arg_asts))
new_prim = self.fill_slots(arg_asts, kwarg_asts, convert_to_ast=True)
if not new_prim.are_slots_filled():
- raise PyExportError("not enough arguments") # TODO better msg
+ raise PyExportError("not enough arguments")
if Primitive._DEBUG:
debug_output(" new_prim.arg_descs: " + repr(new_prim.arg_descs))
@@ -416,12 +416,6 @@ class Primitive(object):
comparators=[right])
else:
return ast.BinOp(op=op, left=left, right=right)
- else:
- # TODO remove
- raise ValueError(("operator Primitive.%s got unexpected"
- " number of arguments (%d)")
- % (str(self.func.__func__.__name__),
- len(new_arg_asts)))
# square root
elif self == Primitive.square_root:
@@ -441,12 +435,7 @@ class Primitive(object):
# identity
elif self == Primitive.identity:
- if len(new_arg_asts) == 1:
- return new_arg_asts[0]
- else:
- # TODO remove
- raise ValueError("Primitive.identity got unexpected number "
- "of arguments (%d)" % (len(new_arg_asts)))
+ return new_arg_asts[0]
# constant
elif self == CONSTANTS.get: