Python Forum

Full Version: mixed decimal point characters
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i have some data in a timed mix to be processed by a Python program i wrote. some of the data uses the European standard of ',' for the decimal point character. mass conversion of all ',' to '.' messed up a lot of ',' in other parts of the data. i am wondering if Python has any facilities for handling a mix of data like that. or else i'll have to write some of my own.

in a different case i may need to process some numbers like 1,234,768 and such (hopefully just US standard).
A quick look suggests there isn't anything of the sort in the standard library. There could be something in PyPi or on Github. Perhaps inherit from Decimal and add parsing and formatting methods to accommodate the format difference.