MCPcopy Create free account
hub / github.com/bspaans/python-mingus / __add__

Method __add__

mingus/containers/track.py:177–187  ·  view source on GitHub ↗

Enable the '+' operator for Tracks. Notes, notes as string, NoteContainers and Bars accepted.

(self, value)

Source from the content-addressed store, hash-verified

175 return self
176
177 def __add__(self, value):
178 """Enable the '+' operator for Tracks.
179
180 Notes, notes as string, NoteContainers and Bars accepted.
181 """
182 if hasattr(value, "bar"):
183 return self.add_bar(value)
184 elif hasattr(value, "notes"):
185 return self.add_notes(value)
186 elif hasattr(value, "name") or isinstance(value, six.string_types):
187 return self.add_notes(value)
188
189 def test_integrity(self):
190 """Test whether all but the last Bars contained in this track are

Callers

nothing calls this directly

Calls 2

add_barMethod · 0.95
add_notesMethod · 0.95

Tested by

no test coverage detected