SortedList
Bases: BaseSortedList[T]
flowchart TD
pyochain.collections._sorted._list.SortedList[SortedList]
pyochain.collections._sorted._list.BaseSortedList[BaseSortedList]
pyochain.collections._sorted._core.BaseSortedListSet[BaseSortedListSet]
pyochain.collections._sorted._core.SortedCollection[SortedCollection]
pyochain.abc._sequences.PyoMutableSequence[PyoMutableSequence]
pyochain.abc._sequences.PyoSequence[PyoSequence]
pyochain.abc._sequences.PyoReversible[PyoReversible]
pyochain.abc._collection.PyoCollection[PyoCollection]
pyochain.abc._iterable.PyoIterable[PyoIterable]
pyochain.abc._collection.PyoContainer[PyoContainer]
pyochain.abc._collection.PyoSized[PyoSized]
pyochain.abc._mixins.Checkable[Checkable]
pyochain.abc._mixins.Fluent[Fluent]
pyochain.abc._mixins.Pipe[Pipe]
pyochain.abc._mixins.Tap[Tap]
pyochain.collections._sorted._list.BaseSortedList --> pyochain.collections._sorted._list.SortedList
pyochain.collections._sorted._core.BaseSortedListSet --> pyochain.collections._sorted._list.BaseSortedList
pyochain.collections._sorted._core.SortedCollection --> pyochain.collections._sorted._core.BaseSortedListSet
pyochain.abc._sequences.PyoMutableSequence --> pyochain.collections._sorted._list.BaseSortedList
pyochain.abc._sequences.PyoSequence --> pyochain.abc._sequences.PyoMutableSequence
pyochain.abc._sequences.PyoReversible --> pyochain.abc._sequences.PyoSequence
pyochain.abc._iterable.PyoIterable --> pyochain.abc._sequences.PyoReversible
pyochain.abc._mixins.Checkable --> pyochain.abc._iterable.PyoIterable
pyochain.abc._mixins.Fluent --> pyochain.abc._iterable.PyoIterable
pyochain.abc._mixins.Pipe --> pyochain.abc._mixins.Fluent
pyochain.abc._mixins.Tap --> pyochain.abc._mixins.Fluent
pyochain.abc._collection.PyoCollection --> pyochain.abc._sequences.PyoSequence
pyochain.abc._iterable.PyoIterable --> pyochain.abc._collection.PyoCollection
pyochain.abc._mixins.Checkable --> pyochain.abc._iterable.PyoIterable
pyochain.abc._mixins.Fluent --> pyochain.abc._iterable.PyoIterable
pyochain.abc._mixins.Pipe --> pyochain.abc._mixins.Fluent
pyochain.abc._mixins.Tap --> pyochain.abc._mixins.Fluent
pyochain.abc._collection.PyoContainer --> pyochain.abc._collection.PyoCollection
pyochain.abc._mixins.Checkable --> pyochain.abc._collection.PyoContainer
pyochain.abc._collection.PyoSized --> pyochain.abc._collection.PyoCollection
pyochain.abc._mixins.Checkable --> pyochain.abc._collection.PyoSized
click pyochain.collections._sorted._list.SortedList href "" "pyochain.collections._sorted._list.SortedList"
click pyochain.collections._sorted._list.BaseSortedList href "" "pyochain.collections._sorted._list.BaseSortedList"
click pyochain.collections._sorted._core.BaseSortedListSet href "" "pyochain.collections._sorted._core.BaseSortedListSet"
click pyochain.collections._sorted._core.SortedCollection href "" "pyochain.collections._sorted._core.SortedCollection"
click pyochain.abc._sequences.PyoMutableSequence href "" "pyochain.abc._sequences.PyoMutableSequence"
click pyochain.abc._sequences.PyoSequence href "" "pyochain.abc._sequences.PyoSequence"
click pyochain.abc._sequences.PyoReversible href "" "pyochain.abc._sequences.PyoReversible"
click pyochain.abc._collection.PyoCollection href "" "pyochain.abc._collection.PyoCollection"
click pyochain.abc._iterable.PyoIterable href "" "pyochain.abc._iterable.PyoIterable"
click pyochain.abc._collection.PyoContainer href "" "pyochain.abc._collection.PyoContainer"
click pyochain.abc._collection.PyoSized href "" "pyochain.abc._collection.PyoSized"
click pyochain.abc._mixins.Checkable href "" "pyochain.abc._mixins.Checkable"
click pyochain.abc._mixins.Fluent href "" "pyochain.abc._mixins.Fluent"
click pyochain.abc._mixins.Pipe href "" "pyochain.abc._mixins.Pipe"
click pyochain.abc._mixins.Tap href "" "pyochain.abc._mixins.Tap"
Sorted list is a sorted MutableSequence.
Sorted list values are maintained in sorted order and must be comparable.
The total ordering of values must not change while they are stored in the SortedList.
Sorted lists use lexicographical ordering semantics when compared to other sequences.
Some methods of MutableSequence are not supported and will raise not-implemented error.
Optional iterable argument provides an initial iterable of values to initialize the sorted list.
Runtime complexity: O(n*log(n))
from pyochain.collections import SortedList
sl = SortedList()
assert repr(sl) == "SortedList([])"
sl = SortedList([3, 1, 2, 5, 4])
assert repr(sl) == "SortedList([1, 2, 3, 4, 5])"
Source code in pyochain/collections/_sorted/_list.pyi
534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 | |