- def add_alias(self, other):
- if getattr(other, '__str__', None):
- if callable(other.__str__):
- self.__aliases |= {other.__str__()}
- elif isinstance(other, Artist):
- self.__aliases |= other._Artist__aliases
- else:
- raise MetaException('No __str__ method found in {!r}'.format(other))
-
- @property
- def names(self):
- return self.__aliases | {self.name,}
-