[issue5125] Strange locale problem with Python 3

2010-02-20 Thread Reto Schüttel
Reto Schüttel added the comment: Hey Mark, Stefan I've got the example working again with 3.1 and it appears like the behaviour has been reverted to the pre-3.0 days. So the problem is fixed for me :)! with 3.1 (and 2.6) atof only accepts a '.' as a decimal delimiter, regardless of the conf

[issue5125] Strange locale problem with Python 3

2010-02-13 Thread Mark Dickinson
Mark Dickinson added the comment: Actually, for Python 3.x, rather than using strtod directly it would be better to use the PyOS_string_to_double C-API function. That function is entirely locale-agnostic: it should behave identically to the float constructor. Python 3.0 is no longer support

[issue5125] Strange locale problem with Python 3

2010-02-13 Thread Stefan Krah
Stefan Krah added the comment: As an aside, I would not use atof(). Better use something like: char *end; f = strtod(input, &end); if (*end != '\0') { PyErr_Format(PyExc_ValueError, "Could not convert: %s", end); return NULL; } I've two questions: 1) Does the problem still appear in

[issue5125] Strange locale problem with Python 3

2009-02-04 Thread Gabriel Genellina
Changes by Gabriel Genellina : -- nosy: +gagenellina ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue5125] Strange locale problem with Python 3

2009-02-02 Thread Robin Stocker
Changes by Robin Stocker : -- nosy: +robin.stocker ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue5125] Strange locale problem with Python 3

2009-02-01 Thread Reto Schüttel
New submission from Reto Schüttel : Hi While helping Brandon Rhodes to port PyEphem[1] to Python 3 we struggled over a strange locale-related problem on OS X. PyEphem is a library which can do astronomical computations like tracking the position of stars, planets and earth satellites relative to