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.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/TurtleArt/taprimitive.py b/TurtleArt/taprimitive.py
index ab6bfe9..b92f2cc 100644
--- a/TurtleArt/taprimitive.py
+++ b/TurtleArt/taprimitive.py
@@ -581,7 +581,7 @@ class Primitive(object):
2. Convert a string containing a number into a float.
3. Convert a single character to its ASCII integer value.
4. Extract the first element of a list and convert it to a number.
- 5. Convert a Color to an int.
+ 5. Convert a Color to a float.
Return None if the value cannot be converted to a number. """
# 1. number
if isinstance(value, (float, int, long, ast.Num)):
@@ -627,9 +627,9 @@ class Primitive(object):
return None
# 5. Color
elif isinstance(value, Color):
- converted = int(value)
+ converted = float(value)
if convert_to_ast:
- conversion_ast = ast.Call(func=ast.Name(id='int',
+ conversion_ast = ast.Call(func=ast.Name(id='float',
ctx=ast.Load),
args=[value_ast],
keywords={},