[Python-Dev] Money module (original) (raw)
Raymond Hettinger python at rcn.com
Fri Jul 1 20:55:55 CEST 2005
- Previous message: [Python-Dev] Money module
- Next message: [Python-Dev] Money module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Facundo]
The pre-PEP is almost done, and the corresponding test cases are all written.
What is the part about the pre-PEP? Something like this probably shouldn't go in the standard library until it has been proven in the field. This doubly true for a module that has made some unusual OO design choices and has an unconventional decomposition of financial functions.
The exchange rate mechanism may end-up not being workable as it does not incorporate rate changes over time, differing forward and reverse rates, non-linear factors such as commission/fees, source currency, or multiple suppliers.
Time value of money computations are typically dimensionless (not sensitive to currency type or formatting) and they often have algorithm specific rounding needs (round at the end of compounding period or each year or only at the end).
The absence of a division operator may prove problematic for allocation routines.
Usually numeric formatting is kept independent from the rest of the design. It will be interesting to see how workable it is to make it part of the Context object. In Excel for instance, formatting is a property of some part of the hierarchy of worksheet, row or column, or specific cell. It is not linked to the context for mathematical operations.
While the Money module remains experimental, it should remain a third-party package.
Raymond
- Previous message: [Python-Dev] Money module
- Next message: [Python-Dev] Money module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]