PythonGlue: more robust number parsing