What would the cleanest way to the following pseudocode be?
class Player
id
name
class Participant (is a subset of Player with an added status)
player_id (ForeignKey to Player)
status
So you can have a list of Players (Wayne, Chuck, Bobby)
And then a list of Participants (Wayne(status:YES), Bobby(status:NO))
Notice that Chuck is not inside the participant list.
So, I am iterating over all the Players, and outputting the status if the Participants exist.
player_list = list with Player objects
participant_list = list with Participant objects
for player in player_list:
if player.id exists in participant_list //QUESTION IS HERE: HOW DO I DO THIS???
print participant.status
I am not sure how to check the inside id of the list that contains Objects???
add in another loop
Not the prettiest solution but simple.