I'm passing in a row from a database which is being read in as a tuple. I like the idea of having these attributes readily available for all child classes, but this feels like it could be done without being so many lines. Is there a better method?
class Player():
def __init__(self, player_attributes):
self.player_id = player_attributes[0]
self.player_first_name = player_attributes[1]
self.player_last_name = player_attributes[2]
self.player_date_of_birth = player_attributes[3]
self.player_city_of_birth = player_attributes[4]
self.player_state_of_birth = player_attributes[5]
self.player_height = player_attributes[6]
self.player_weight = player_attributes[7]
self.player_age = player_attributes[8]
self.player_hair_color = player_attributes[9]
self.player_favorite_food = player_attributes[10]
self.player_favorite_sport = player_attributes[11]
...(20 more attributes)