[python] fix #3948 again and also check for ints and floats
[python] fix #3948 again and also check for ints and floats

pleclech/hacking-haxe,pleclech/hacking-haxe,pleclech/hacking-haxe,pleclech/hacking-haxe,pleclech/hacking-haxe,pleclech/hacking-haxe