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

Method __add__

mingus/containers/composition.py:89–97  ·  view source on GitHub ↗

Enable the '+' operator for Compositions. Notes, note strings, NoteContainers, Bars and Tracks are accepted.

(self, value)

Source from the content-addressed store, hash-verified

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."""

Callers

nothing calls this directly

Calls 2

add_trackMethod · 0.95
add_noteMethod · 0.95

Tested by

no test coverage detected