Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter@walter-laptop.(none)>2009-10-27 13:53:54 (GMT)
committer Walter Bender <walter@walter-laptop.(none)>2009-10-27 13:53:54 (GMT)
commita7634e9733e4f282367ecb217d3f056ea2155bd8 (patch)
treed798080e56dd0c29d7ec8c5e088ba28a375abf7c
parent66d15fc186e90446bf7b9db2bb911d3a4f257197 (diff)
type casting to floatv77
-rw-r--r--tamyblock.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tamyblock.py b/tamyblock.py
index 63dd1b9..5b474ee 100644
--- a/tamyblock.py
+++ b/tamyblock.py
@@ -34,7 +34,9 @@ def myblock(lc,x):
#
###########################################################################
- if type(x) != int and type(x) != float: # make sure x is a number
+ try: # make sure x is a number
+ x = float(x)
+ except:
return
pen = lc.tw.turtle.pendown # save current turtle pen state