Doc/API ideas
mahmoud opened this issue · comments
Mahmoud Hashemi commented
- Illustrative example - show naive version output vs closest_round_division (a la here)
- Take dictionary input for
fractions
(e.g.,{amount: 1, tax: 0.03}
) - Should
numbers
beamounts
to stay consistent with the currency theme? - This should be a list of lists:
common_cents/common_cents/__init__.py
Lines 28 to 29 in 2d8d577
closest_round_division
is a mouthful and seems to be stretching to objectively describe a subjective/qualitative operation. I'd propose something likefair_split(amounts=[], allotments=[])
- Document the rounding logic around float errors (just that
sum([1/6] * 6) != 1
in python, but here it== 1
) refund
is confusing. Maybe this should be a utility function?split
docstring needs to be beefed up. Also "split
" is pretty overloaded in python, maybe something likefair_split
or evendivvy