def intcomma(value):
    orig = force_unicode(value)
    new = re.sub("^(-?\d+)(\d{3})", '\g<1>,\g<2>', orig)
    if orig == new:
        return new
    else:
        return intcomma(new)
Converts an integer to a string containing commas every three digits.
dataset/ETHPy150Open CollabQ/CollabQ/vendor/django/contrib/humanize/templatetags/humanize.py/intcomma