Mercurial > babel > mirror
comparison babel/numbers.py @ 583:ae897a807442 trunk
restore Python 2.4 compatibility (broken in r634)
author | fschwarz |
---|---|
date | Sat, 04 Aug 2012 14:35:51 +0000 |
parents | ea413a4d754b |
children | e0454b9c125c |
comparison
equal
deleted
inserted
replaced
582:3fd7fb953633 | 583:ae897a807442 |
---|---|
335 digits = map(str, digits) | 335 digits = map(str, digits) |
336 | 336 |
337 # get figures after decimal point | 337 # get figures after decimal point |
338 for i in range(-exp): | 338 for i in range(-exp): |
339 # add digit if available, else 0 | 339 # add digit if available, else 0 |
340 frac_part.append(digits.pop() if digits else '0') | 340 if digits: |
341 frac_part.append(digits.pop()) | |
342 else: | |
343 frac_part.append('0') | |
341 | 344 |
342 # add in some zeroes... | 345 # add in some zeroes... |
343 for i in range(exp): | 346 for i in range(exp): |
344 int_part.append('0') | 347 int_part.append('0') |
345 | 348 |