for with decimal values?
wuwei23 at gmail.com
Mon May 4 04:48:20 CEST 2009
On May 4, 11:41 am, Esmail <ebo... at hotmail.com> wrote:
> All this discussion makes me wonder if it would be a good idea
> for Python to have this feature (batteries included and all) - it
> would have its uses, no?
Well, sometimes more discussion == less consensus :)
But it's really easy to roll your own:
from decimal import Decimal
'''*args to Decimal decorator'''
float2dec = lambda f: Decimal(str(f))
args = map(float2dec, args)
def drange(start, stop, step):
while start < stop:
start += step
More information about the Python-list