def get_commenters(self, commenter_ids=None): """ Return a dict of Commenters. """ SqNode.assert_loaded(self._commenters) if commenter_ids is None: return self._commenters else: return {id: self.get_commenter(id) for id in commenter_ids}
def get_opponents(self, opponent_ids=None): """ Return a list of Opponents. """ SqNode.assert_loaded(self._opponents) if opponent_ids is None: return self._opponents.values() else: return [self.get_opponent(id) for id in opponent_ids]
def get_commenter(self, commenter_id): """ Return a Person that's commented by their id. """ SqNode.assert_loaded(self._commenters) return self._commenters.get(commenter_id, None)
def get_opponent(self, opp_id): """ Return an Opponent by its id. """ SqNode.assert_loaded(self._opponents) return self._opponents.get(opp_id, None)
def get_creator(self): """ Return the Person that created this Game. """ SqNode.assert_loaded(self._creator) return self._creator