parameters: (self)
docstring: Sorts the population be fitness and
          truncates up to maximum population size.
docstring_summary: Sorts the population be fitness and
          truncates up to maximum population size.
docstring_tokens: Sorts the population be fitness and truncates up to maximum population size .
function: def sort(self):
          """Sorts the population be fitness and
          truncates up to maximum population size.
          """
          self.chromosomes.sort(key=lambda x: x.fitness, reverse=True)
          del self.chromosomes[self.size:]
function_tokens: def sort ( self ) : self . chromosomes . sort ( key = lambda x : x . fitness , reverse = True ) del self . chromosomes [ self . size : ]