Enable the '+' operator for Compositions. Notes, note strings, NoteContainers, Bars and Tracks are accepted.
(self, value)
| 87 | self.email = email |
| 88 | |
| 89 | def __add__(self, value): |
| 90 | """Enable the '+' operator for Compositions. |
| 91 | |
| 92 | Notes, note strings, NoteContainers, Bars and Tracks are accepted. |
| 93 | """ |
| 94 | if hasattr(value, "bars"): |
| 95 | return self.add_track(value) |
| 96 | else: |
| 97 | return self.add_note(value) |
| 98 | |
| 99 | def __getitem__(self, index): |
| 100 | """Enable the '[]' notation.""" |