def _team_changed(self, team):
        """ Handles a new team being selected.
        """
        if len(team.players) > 0:
            self.player = team.players[0]
        else:
            self.player = None

# Function to add two numbers (used with 'reduce'):
dataset/ETHPy150Open enthought/traits/examples/tutorials/traits_4.0/extended_trait_change/properties.py/LeagueModelView._team_changed/original