The main reason it fails with Python is because 4321.90
is interpreted as float (you lose precision at that point) and then casted to Decimal
at runtime. With C# 4321.90m
is interpreted as decimal to begin with. Python simply doesn't support decimals as a built-in structure.
But there's an easy way to fix that with Python. Simply use strings:
>>> Decimal('4321.90') * Decimal('100')
Decimal('432190.00')