(name, version, for_filename=False)
return '%s-%s' % (name, version)
Return the distribution name with version.

    If for_filename is true, return a filename-escaped form.
Return the distribution name with version.
Return the distribution name with version .
def _get_name_and_version(name, version, for_filename=False):
    """Return the distribution name with version.

    If for_filename is true, return a filename-escaped form."""
    if for_filename:
        # For both name and version any runs of non-alphanumeric or '.'
        # characters are replaced with a single '-'.  Additionally any
        # spaces in the version string become '.'
        name = _FILESAFE.sub('-', name)
        version = _FILESAFE.sub('-', version.replace(' ', '.'))
    return '%s-%s' % (name, version)
def _get_name_and_version ( name , version , for_filename = False ) : if for_filename : # For both name and version any runs of non-alphanumeric or '.' # characters are replaced with a single '-'.  Additionally any # spaces in the version string become '.' name = _FILESAFE . sub ( '-' , name ) version = _FILESAFE . sub ( '-' , version . replace ( ' ' , '.' ) ) return '%s-%s' % ( name , version )