Nice. Doctests are good for verifying functions and as part of the documentation as they show what you should expect with the call (example):

def makeString(stringNote0, key, mode, retVal, capo):

"""

makeString(stringNote0, key, mode, retVal, capo)

Populate a string (12 frets) with scale or cord information

Note the test makeString('F#', keys.Gb, scales.Major, 1, 0)

where the F# is data and keys.Gb is a variable name. Python

varianles cannot contain #.

>>> scale = makeScale(keys.C, scales.Ionian)

>>> makeString('C', keys.C, scales.Major, 1, 0)

['C', '', 'D', '', 'E', 'F', '', 'G', '', 'A', '', 'B']

>>> makeString('C', keys.C, scales.Major, 2, 0)

['I', '', 'II', '', 'III', 'IV', '', 'V', '', 'VI', '', 'VII']

>>> makeString('C', keys.C, scales.Major, 3, 0)

['1', '', '2', '', '3', '4', '', '5', '', '6', '', '7']

>>> makeString('C', keys.C, scales.Major, 4, 0)

['Do', '', 'Re', '', 'Mi', 'Fa', '', 'Sol', '', 'La', '', 'Ti']

>>> makeString('Db', keys.Db, scales.Major, 1, 0)

['Db', '', 'Eb', '', 'F', 'Gb', '', 'Ab', '', 'Bb', '', 'C']

Retired and living my golden years in a world full of angry people.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store