best way of dealing with currency?

Paul Miller paul at
Tue Oct 16 21:29:28 CEST 2007

I'm looking at doing some currency calculations in some Python code 
integrated with a C++ application. I want to be able to come up with the 
same values I get in an Excel spreadsheet.

I've been poking around for a couple of days and haven't come across a 
definitive method for dealing with currency in a precise manner.

What do I need to do? Use rationals? Very high-precision floating-point? 
  mxNumber? Or something else?

Thanks for any and all input!

More information about the Python-list mailing list