[Pymoney-general] Re: Currency's distrib() method
Brought to you by:
facundobatista
From: Jeff K. <jt...@ya...> - 2005-07-02 12:56:12
|
Facundo Batista wrote: > The order of distrib() results is not assured. If it doesn't slow down the distrib() implementation (i.e. only a sort() before returning), then perhaps the order of the results (if splitting on only one divider) should be assured, and selected with a keyword argument, defaulting to descending order. If the results of distrib() are unsorted, most applications using the method (again in the case of a single divider) will implement the same boilerplate to sort in ascending or descending order after each call. distrib_multiple() could be a separate method, to support a list of dividers mentioned in option 3. I think support for multiple dividers should be in there somehow, since it will be kind of tricky for most library users to implement a correct one on their own if they have a need. |