Richard Damon <rich...@damon-family.org>: > If you know the Locale, then you do know what the decimal separator > is, as that is part of what a locale defines.
I don't know what that sentence means. > The issue is that if you just know the encoding, you don't necessarily > know the locale. I always know my locale. The locale is tied to the human user. > He also commented that he didn't want to set the locale in the > routine, as that sets it globally for the full application (but > perhaps that latter could be fixed by first doing a > locale.getlocale(), then setlocale for the files locale, and then at > the end of reading and processing restore back the old locale. Setting a locale application-wise is * not in accordance with the idea of a locale (the locale should be constant within a user session) * not easily possible (the locale is seen by all threads simultaneously) BTW, I think the locale is a terrible invention. Marko -- https://mail.python.org/mailman/listinfo/python-list