From 04986566b5d2bc0cd6982f8cb7dc19eac529e8ec Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Wed, 16 Jan 2013 23:29:03 +0000 Subject: cast ints as floats when passing args to Python block --- diff --git a/plugins/turtle_blocks_extras/turtle_blocks_extras.py b/plugins/turtle_blocks_extras/turtle_blocks_extras.py index 183c4ac..43703a7 100644 --- a/plugins/turtle_blocks_extras/turtle_blocks_extras.py +++ b/plugins/turtle_blocks_extras/turtle_blocks_extras.py @@ -1084,6 +1084,9 @@ bullets')) def _prim_myfunction(self, f, x): """ Programmable block """ + for i, v in enumerate(x): + if type(v) == int: # Pass float values to Python block + x[i] = float(v) try: y = myfunc(f, x) if str(y) == 'nan': -- cgit v0.9.1