Ticket #18800: local_history.patch

File local_history.patch, 716 bytes (added by jbvsmo@…, 3 years ago)

Remove float call that can break on big integers

  • C:/Downloads/django/django/utils/numberformat.py

     
    1919    # Make the common case fast
    2020    if isinstance(number, int) and not use_grouping and not decimal_pos:
    2121        return mark_safe(unicode(number))
    22     # sign
    23     if float(number) < 0:
    24         sign = '-'
    25     else:
    26         sign = ''
     22    sign = ''
    2723    str_number = unicode(number)
    2824    if str_number[0] == '-':
     25        sign = '-'
    2926        str_number = str_number[1:]
    3027    # decimal part
    3128    if '.' in str_number:
Back to Top