def propstat_by_status(propstat):
    """Sort a list of propstatus objects by HTTP status.

    :param propstat: List of PropStatus objects:
    :return: dictionary mapping HTTP status code to list of PropStatus objects
    """
    bystatus = {}
    for propstat in propstat:
        bystatus.setdefault((propstat.statuscode, propstat.
            responsedescription), []).append(propstat.prop)
    return bystatus
