From a7634e9733e4f282367ecb217d3f056ea2155bd8 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Tue, 27 Oct 2009 13:53:54 +0000 Subject: type casting to float --- 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 -- cgit v0.9.1