def make_abstract_dist(req_to_install):
 if req_to_install.editable:
  return IsSDist(req_to_install)
 elif (req_to_install.link and req_to_install.link.is_wheel):
  return IsWheel(req_to_install)
 else:
  return IsSDist(req_to_install)

def make_abstract_dist ( req_to_install ) : if req_to_install . editable : return IsSDist ( req_to_install ) elif ( req_to_install . link and req_to_install . link . is_wheel ) : return IsWheel ( req_to_install ) else : return IsSDist ( req_to_install )
factory to make an abstract dist object .