Ticket #16514: classic_division_fix.diff

File classic_division_fix.diff, 515 bytes (added by blume.mike@…, 13 years ago)

Use explicit floored division instead

  • django/template/defaultfilters.py

    diff --git a/django/template/defaultfilters.py b/django/template/defaultfilters.
    index b68cc03..c444830 100644
    a b fix_ampersands_filter.is_safe=True  
    9090# (see Python Issue757815 and Issue1080440).
    9191pos_inf = 1e200 * 1e200
    9292neg_inf = -1e200 * 1e200
    93 nan = (1e200 * 1e200) / (1e200 * 1e200)
     93nan = (1e200 * 1e200) // (1e200 * 1e200)
    9494special_floats = [str(pos_inf), str(neg_inf), str(nan)]
    9595
    9696def floatformat(text, arg=-1):
Back to Top