TypedTuple

digraph InheritanceGraph { graph [bgcolor=transparent, color=lightsteelblue2, fontname=Arial, fontsize=10, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, splines=spline, style="dashed, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=10, height=0, penwidth=2, shape=box, style="filled, rounded", width=0]; edge [color=lightslategrey, penwidth=1]; subgraph "cluster_abjad.pitch" { graph [label="abjad.pitch"]; node [color=1]; "abjad.pitch.IntervalClassSegment.IntervalClassSegment" [URL="../api/abjad/utilities/../pitch/IntervalClassSegment.html#abjad.pitch.IntervalClassSegment.IntervalClassSegment", label="Interval\nClass\nSegment", target=_top]; "abjad.pitch.IntervalSegment.IntervalSegment" [URL="../api/abjad/utilities/../pitch/IntervalSegment.html#abjad.pitch.IntervalSegment.IntervalSegment", label="Interval\nSegment", target=_top]; "abjad.pitch.PitchClassSegment.PitchClassSegment" [URL="../api/abjad/utilities/../pitch/PitchClassSegment.html#abjad.pitch.PitchClassSegment.PitchClassSegment", label="Pitch\nClass\nSegment", target=_top]; "abjad.pitch.PitchSegment.PitchSegment" [URL="../api/abjad/utilities/../pitch/PitchSegment.html#abjad.pitch.PitchSegment.PitchSegment", label="Pitch\nSegment", target=_top]; "abjad.pitch.Segment.Segment" [URL="../api/abjad/utilities/../pitch/Segment.html#abjad.pitch.Segment.Segment", label=Segment, shape=oval, style=bold, target=_top]; "abjad.pitch.TwelveToneRow.TwelveToneRow" [URL="../api/abjad/utilities/../pitch/TwelveToneRow.html#abjad.pitch.TwelveToneRow.TwelveToneRow", label="Twelve\nTone\nRow", target=_top]; "abjad.pitch.PitchClassSegment.PitchClassSegment" -> "abjad.pitch.TwelveToneRow.TwelveToneRow"; "abjad.pitch.Segment.Segment" -> "abjad.pitch.IntervalClassSegment.IntervalClassSegment"; "abjad.pitch.Segment.Segment" -> "abjad.pitch.IntervalSegment.IntervalSegment"; "abjad.pitch.Segment.Segment" -> "abjad.pitch.PitchClassSegment.PitchClassSegment"; "abjad.pitch.Segment.Segment" -> "abjad.pitch.PitchSegment.PitchSegment"; } subgraph "cluster_abjad.system" { graph [label="abjad.system"]; node [color=2]; "abjad.system.AbjadObject.AbjadObject" [URL="../api/abjad/utilities/../system/AbjadObject.html#abjad.system.AbjadObject.AbjadObject", label="Abjad\nObject", target=_top]; } subgraph "cluster_abjad.utilities" { graph [label="abjad.utilities"]; node [color=3]; "abjad.utilities.PatternTuple.PatternTuple" [URL="../api/abjad/utilities/PatternTuple.html#abjad.utilities.PatternTuple.PatternTuple", label="Pattern\nTuple", target=_top]; "abjad.utilities.TypedCollection.TypedCollection" [URL="../api/abjad/utilities/TypedCollection.html#abjad.utilities.TypedCollection.TypedCollection", label="Typed\nCollection", shape=oval, style=bold, target=_top]; "abjad.utilities.TypedTuple.TypedTuple" [URL="../api/abjad/utilities/TypedTuple.html#abjad.utilities.TypedTuple.TypedTuple", color=black, fontcolor=white, label="Typed\nTuple", target=_top]; "abjad.utilities.TypedCollection.TypedCollection" -> "abjad.utilities.TypedTuple.TypedTuple"; "abjad.utilities.TypedTuple.TypedTuple" -> "abjad.utilities.PatternTuple.PatternTuple"; } subgraph cluster_builtins { graph [label=builtins]; node [color=4]; "builtins.object" [URL="https://docs.python.org/3.6/library/functions.html#object", label=object, target=_top]; } subgraph "cluster_collections.abc" { graph [label="collections.abc"]; node [color=5]; "collections.abc.Collection" [URL="https://docs.python.org/3.6/library/collections.abc.html#collections.abc.Collection", label=Collection, shape=oval, style=bold, target=_top]; "collections.abc.Container" [URL="https://docs.python.org/3.6/library/collections.abc.html#collections.abc.Container", label=Container, shape=oval, style=bold, target=_top]; "collections.abc.Iterable" [URL="https://docs.python.org/3.6/library/collections.abc.html#collections.abc.Iterable", label=Iterable, shape=oval, style=bold, target=_top]; "collections.abc.Reversible" [URL="https://docs.python.org/3.6/library/collections.abc.html#collections.abc.Reversible", label=Reversible, shape=oval, style=bold, target=_top]; "collections.abc.Sequence" [URL="https://docs.python.org/3.6/library/collections.abc.html#collections.abc.Sequence", label=Sequence, shape=oval, style=bold, target=_top]; "collections.abc.Sized" [URL="https://docs.python.org/3.6/library/collections.abc.html#collections.abc.Sized", label=Sized, shape=oval, style=bold, target=_top]; "collections.abc.Collection" -> "collections.abc.Sequence"; "collections.abc.Container" -> "collections.abc.Collection"; "collections.abc.Iterable" -> "collections.abc.Collection"; "collections.abc.Iterable" -> "collections.abc.Reversible"; "collections.abc.Reversible" -> "collections.abc.Sequence"; "collections.abc.Sized" -> "collections.abc.Collection"; } "abjad.system.AbjadObject.AbjadObject" -> "abjad.utilities.TypedCollection.TypedCollection"; "abjad.utilities.TypedTuple.TypedTuple" -> "abjad.pitch.Segment.Segment"; "builtins.object" -> "abjad.system.AbjadObject.AbjadObject"; "builtins.object" -> "collections.abc.Container"; "builtins.object" -> "collections.abc.Iterable"; "builtins.object" -> "collections.abc.Sized"; "collections.abc.Sequence" -> "abjad.utilities.TypedTuple.TypedTuple"; }

class abjad.utilities.TypedTuple.TypedTuple(items=None, item_class=None)

Typed tuple.


Attributes Summary

__add__ Adds typed tuple to argument.
__contains__ Is true if typed tuple contains item.
__getitem__ Gets item or slice identified by argument.
__hash__ Hashes typed tuple.
__mul__ Multiplies typed tuple by argument.
__radd__ Right-adds argument to typed tuple.
__rmul__ Multiplies argument by typed tuple.
count Counts item in collection.
index Gets index of item in collection.

Special methods

__add__(argument)

Adds typed tuple to argument.

Returns new typed tuple.

__contains__(item)

Is true if typed tuple contains item.

Coerces item.

Returns none.

(TypedCollection).__eq__(argument)

Is true when argument is a typed collection with items that compare equal to those of this typed collection.

Returns true or false.

(AbjadObject).__format__(format_specification='')

Formats Abjad object.

Set format_specification to '' or 'storage'. Interprets '' equal to 'storage'.

Returns string.

__getitem__(argument)

Gets item or slice identified by argument.

Returns item or new typed tuple.

__hash__()

Hashes typed tuple.

Returns integer.

(TypedCollection).__iter__()

Iterates typed collection.

Returns generator.

(TypedCollection).__len__()

Gets length of typed collection.

Returns nonnegative integer.

__mul__(argument)

Multiplies typed tuple by argument.

Returns new typed tuple.

__radd__(argument)

Right-adds argument to typed tuple.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.

(Sequence).__reversed__()
__rmul__(argument)

Multiplies argument by typed tuple.

Returns new typed tuple.


Methods

count(item)

Counts item in collection.

Coerces item.

Returns nonnegative integer.

index(item)

Gets index of item in collection.

Coerces item.

Returns nonnegative integer.


Read-only properties

(TypedCollection).item_class

Gets item class of collection.

Collection coerces items according to item_class.

Returns class.

(TypedCollection).items

Gets items in collection.

Returns list.