Sorted list is a sorted mutable sequence. Sorted list values are maintained in sorted order. Sorted list values must be comparable. The total ordering of values must not change while they are stored in the sorted list. Methods for adding values: * :func:`SortedList.add` *
| 83 | |
| 84 | |
| 85 | class SortedList(MutableSequence): |
| 86 | """Sorted list is a sorted mutable sequence. |
| 87 | |
| 88 | Sorted list values are maintained in sorted order. |
| 89 | |
| 90 | Sorted list values must be comparable. The total ordering of values must |
| 91 | not change while they are stored in the sorted list. |
| 92 | |
| 93 | Methods for adding values: |
| 94 | |
| 95 | * :func:`SortedList.add` |
| 96 | * :func:`SortedList.update` |
| 97 | * :func:`SortedList.__add__` |
| 98 | * :func:`SortedList.__iadd__` |
| 99 | * :func:`SortedList.__mul__` |
| 100 | * :func:`SortedList.__imul__` |
| 101 | |
| 102 | Methods for removing values: |
| 103 | |
| 104 | * :func:`SortedList.clear` |
| 105 | * :func:`SortedList.discard` |
| 106 | * :func:`SortedList.remove` |
| 107 | * :func:`SortedList.pop` |
| 108 | * :func:`SortedList.__delitem__` |
| 109 | |
| 110 | Methods for looking up values: |
| 111 | |
| 112 | * :func:`SortedList.bisect_left` |
| 113 | * :func:`SortedList.bisect_right` |
| 114 | * :func:`SortedList.count` |
| 115 | * :func:`SortedList.index` |
| 116 | * :func:`SortedList.__contains__` |
| 117 | * :func:`SortedList.__getitem__` |
| 118 | |
| 119 | Methods for iterating values: |
| 120 | |
| 121 | * :func:`SortedList.irange` |
| 122 | * :func:`SortedList.islice` |
| 123 | * :func:`SortedList.__iter__` |
| 124 | * :func:`SortedList.__reversed__` |
| 125 | |
| 126 | Methods for miscellany: |
| 127 | |
| 128 | * :func:`SortedList.copy` |
| 129 | * :func:`SortedList.__len__` |
| 130 | * :func:`SortedList.__repr__` |
| 131 | * :func:`SortedList._check` |
| 132 | * :func:`SortedList._reset` |
| 133 | |
| 134 | Sorted lists use lexicographical ordering semantics when compared to other |
| 135 | sequences. |
| 136 | |
| 137 | Some methods of mutable sequences are not supported and will raise |
| 138 | not-implemented error. |
| 139 | |
| 140 | """ |
| 141 | DEFAULT_LOAD_FACTOR = 1000 |
| 142 |
no outgoing calls