def _contributor_role_setter(self, role: str, name: str) -> None: ''' set the name for a particular role, adding a new contributor in the process if none exists for that role. see composer.setter property for an example ''' c = None result = self.getContributorsByRole(role) if result is not None: c = result[0] else: c = Contributor() c.role = role self.contributors.append(c) c.name = name
def composer(self, value): c = Contributor() c.name = value c.role = 'composer' self.contributors.append(c)
def composer(self, value): c = Contributor() c.name = value c.role = 'composer' self.contributors.append(c)