prePEP: Money data type

Alex Martelli aleax at aleax.it
Mon Oct 20 15:13:41 EDT 2003


Batista, Facundo wrote:
   ...
>>>> m = Money(3, 2, round=roundException)
>>>> m / 3
> Here it raises an EXCEPTION!

Excellent.  You can also provide a .divideBy(N) method that returns
an N-items list, distributing the excess pennies (or whatever units);
an URL by Martin Fowler that was quoted on the thread shows that.


Alex





More information about the Python-list mailing list