music.GenericPeal¶
- class music.GenericPeal[source]¶
Bases:
objectA collection of named peals that can be acted on a domain.
The base for the named-peal model: peals maps a name to a list of permutations, and act applies one of them by name.
Pealsworks that way and inherits this.music.PlainChangesdeliberately does not. It is built from one peal rather than holding several, so its act acts that peal and takes the domain first –act(domain)rather thanact(name, domain). The two are different operations that happen to share a verb.- Attributes:
Methods
act(peal[, domain])Acts a specific peal on the specified domain.
act_all([domain])Acts all peals on the specified domain.
Methods
__init__()Initializes a GenericPeal object.
act(peal[, domain])Acts a specific peal on the specified domain.
act_all([domain])Acts all peals on the specified domain.
Attributes
name -> list of permutations.
- peals: dict¶
name -> list of permutations. Empty rather than None: a collection with nothing in it is what an unpopulated one is, and act() refuses to run on either.