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

Method __add__

mingus/containers/note_container.py:335–344  ·  view source on GitHub ↗

Enable the use of the '+' operator on NoteContainers. Example: >>> n = NoteContainer(['C', 'E', 'G']) >>> n + 'B' ['C-4', 'E-4', 'G-4', 'B-4']

(self, notes)

Source from the content-addressed store, hash-verified

333 return self.notes
334
335 def __add__(self, notes):
336 """Enable the use of the '+' operator on NoteContainers.
337
338 Example:
339 >>> n = NoteContainer(['C', 'E', 'G'])
340 >>> n + 'B'
341 ['C-4', 'E-4', 'G-4', 'B-4']
342 """
343 self.add_notes(notes)
344 return self
345
346 def __sub__(self, notes):
347 """Enable the use of the '-' operator on NoteContainers.

Callers

nothing calls this directly

Calls 1

add_notesMethod · 0.95

Tested by

no test coverage detected