def slugize(slug):
    """Convert a string to a string for an URL.
    """
    assert name_pattern.match(slug) is not None
    slug = slug.lower()
    for c in (' ', ',', '.', '_'):
        slug = slug.replace(c, '-')
    while slug in '--':
        slug = slug.replace('--', '-')
    slug = slug.strip('-')
    return slug
dataset/ETHPy150Open gratipay/gratipay.com/gratipay/models/community.py/slugize/swapped operands of `in`