Is there a way to temporarily activate a locale within the scope of a block of code? Basically, I want to do something like this:
locale.setlocale(locale.LC_
I found out that Babel better fits my use case:
>>> parse_decimal('1,25', locale='nl_BE.utf8') Decimal('1.25')
This approach is useful whenever I need to parse a Dutch decimal and doesn't require overriding any locales at all.