(extra)
return re.sub('[^A-Za-z0-9.-]+', '_', extra).lower()
Convert an arbitrary string to a standard 'extra' name

    Any runs of non-alphanumeric characters are replaced with a single '_',
    and the result is always lowercased.
Convert an arbitrary string to a standard 'extra' name
Convert an arbitrary string to a standard extra name
def safe_extra(extra):
    """Convert an arbitrary string to a standard 'extra' name

    Any runs of non-alphanumeric characters are replaced with a single '_',
    and the result is always lowercased.
    """
    return re.sub('[^A-Za-z0-9.-]+', '_', extra).lower()
def safe_extra ( extra ) : return re . sub ( '[^A-Za-z0-9.-]+' , '_' , extra ) . lower ( )