List of contiguous runs of values.
A RunList is an efficient encoding of a sequence of values. For example, the sequence aaaabbccccc is encoded as (4, a), (2, b), (5, c). The class provides methods for modifying and querying the run list without needing to deal with the tricky cases of splitting and merging the run list entries.
Run lists are used to represent formatted character data in pyglet. A separate run list is maintained for each style attribute, for example, bold, italic, font size, and so on. Unless you are overriding the document interfaces, the only interaction with run lists is via RunIterator.
The length and ranges of a run list always refer to the character positions in the decoded list. For example, in the above sequence, set_run(2, 5, 'x') would change the sequence to aaxxxbccccc.
Create a run list of the given size and a default value.
Remove characters from the run list.
Get an extended iterator over the run list.
Insert characters into the run list.
The inserted characters will take on the value immediately preceding the insertion point (or the value of the first character, if pos is 0).
Set the value of a range of characters.