def all_discrete(comp_dists):
 if isinstance(comp_dists, Distribution):
  return isinstance(comp_dists, Discrete)
 else:
  return all((isinstance(comp_dist, Discrete) for comp_dist in comp_dists))

def all_discrete ( comp_dists ) : if isinstance ( comp_dists , Distribution ) : return isinstance ( comp_dists , Discrete ) else : return all ( ( isinstance ( comp_dist , Discrete ) for comp_dist in comp_dists ) )
determine if all distributions in comp_dists are discrete .