File tree Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -59,10 +59,11 @@ Issue Tracker`_.
59
59
Sorted List
60
60
-----------
61
61
62
- At the core of :doc: `Sorted Containers<index> ` is the mutable sequence data type
63
- :class: `SortedList `. The :class: `SortedList ` maintains its values in ascending
64
- sort order. As with Python's built-in list data type, :class: `SortedList ` supports
65
- duplicate elements and fast random-access indexing.
62
+ At the core of :doc: `Sorted Containers<index> ` is the mutable sequence data
63
+ type :class: `SortedList `. The :class: `SortedList ` maintains its values in
64
+ ascending sort order. As with Python's built-in list data type,
65
+ :class: `SortedList ` supports duplicate elements and fast random-access
66
+ indexing.
66
67
67
68
>>> from sortedcontainers import SortedList
68
69
>>> sl = SortedList()
@@ -532,9 +533,9 @@ total ordering of keys must not change while they are stored in the
532
533
>>> from sortedcontainers import SortedDict
533
534
>>> sd = SortedDict()
534
535
535
- Items may be added to a :class: `SortedDict ` using :func: ` SortedDict.__setitem__ `,
536
- :func: `SortedDict.update ` or :func: `SortedDict.setdefault `. When doing so, the
537
- keys remain sorted.
536
+ Items may be added to a :class: `SortedDict ` using
537
+ :func: `SortedDict.__setitem__ `, :func: `SortedDict.update ` or
538
+ :func: ` SortedDict.setdefault `. When doing so, the keys remain sorted.
538
539
539
540
>>> sd[' e' ] = 5
540
541
>>> sd[' b' ] = 2
Original file line number Diff line number Diff line change @@ -119,8 +119,8 @@ blist when it comes to adding random values to a sorted list. Notice also
119
119
Raymond’s recipe is just a list and that displays order n-squared runtime
120
120
complexity. That’s why it curves upwards.
121
121
122
- Of all the sorted collections libraries, `Sorted Containers `_ is also fastest at
123
- initialization. We’ll look at why soon.
122
+ Of all the sorted collections libraries, `Sorted Containers `_ is also fastest
123
+ at initialization. We’ll look at why soon.
124
124
125
125
`Sorted Containers `_ is not always fastest. But notice here the performance
126
126
improves with scale. You can see it there in blue. It starts in the middle of
Original file line number Diff line number Diff line change 67
67
]
68
68
69
69
__title__ = 'sortedcontainers'
70
- __version__ = '1.5.10 '
71
- __build__ = 0x010510
70
+ __version__ = '2.0.0 '
71
+ __build__ = 0x020000
72
72
__author__ = 'Grant Jenks'
73
73
__license__ = 'Apache 2.0'
74
74
__copyright__ = '2014-2018, Grant Jenks'
You can’t perform that action at this time.
0 commit comments