On Jul 22, 7:42 am, Hrvoje Niksic <hnik...@xemacs.org> wrote: > Frank Millman <fr...@chagford.com> writes: > > int(float(x)) does the job, and I am happy with that. I was just > > asking if there were any alternatives. > > int(float(s)) will corrupt integers larger than 2**53, should you ever > need them. int(decimal.Decimal(s)) works with numbers of arbitrary > size.
Correct! >>> '{0:,.0f}'.format(2**53) '9,007,199,254,740,992' That's nine-quadrillion people! Only for galactic measurements or microscopic reasons would you need such large numbers. PS: GAWD i love that new string format function! -- http://mail.python.org/mailman/listinfo/python-list