From 04986566b5d2bc0cd6982f8cb7dc19eac529e8ec Mon Sep 17 00:00:00 2001
From: Walter Bender <walter.bender@gmail.com>
Date: Wed, 16 Jan 2013 18:29:03 -0500
Subject: [PATCH] cast ints as floats when passing args to Python block
Organization: Sugar Labs Foundation
---
plugins/turtle_blocks_extras/turtle_blocks_extras.py | 3 +++
1 file changed, 3 insertions(+)
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
|
b
|
bullets')) |
1084 | 1084 | |
1085 | 1085 | def _prim_myfunction(self, f, x): |
1086 | 1086 | """ Programmable block """ |
| 1087 | for i, v in enumerate(x): |
| 1088 | if type(v) == int: # Pass float values to Python block |
| 1089 | x[i] = float(v) |
1087 | 1090 | try: |
1088 | 1091 | y = myfunc(f, x) |
1089 | 1092 | if str(y) == 'nan': |