Re: [Pymoney-general] Currency's distrib() method
Brought to you by:
facundobatista
From: Facundo B. <fac...@gm...> - 2005-07-01 09:51:26
|
On 7/1/05, Darek Suchojad <ds...@ti...> wrote: > Facundo Batista wrote: >=20 > > 1. Returning the different currencies, splitting almost equally:: > ... > > 3. Returning the different currencies, splitting differently:: > ... >=20 > Is it possible to have a combination of 1) and 3), with 1) being > a special case of 3)? That is, something along the lines of: >=20 > def distrib(self,nparts=3DNone,proportions=3DNone): > if nparts: > return self._real_distrib([1] * nparts) > return self._real_distrib(proportions) Yes, it'd be possible. But what basically you're saying is, ok, with the option 3 we include option 1, but with a more complex API. Is really needed to make the API more complex? Because if not, we'll got the (1) and not for the (3)... Regards, . Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ |