@@ -82,33 +82,40 @@ The following functions are provided:
8282 on the heap.
8383
8484
85+ .. function :: heapify_max(x)
86+
87+ Transform list *x * into a heap, in-place, in linear time.
88+
89+ .. versionadded :: next
90+
91+
8592.. function :: heappush_max(heap, item)
8693
8794 Push the value *item * onto the *heap *, maintaining the heap invariant.
8895
96+ .. versionadded :: next
8997
9098.. function :: heappop_max(heap)
9199
92100 Pop and return the largest item from the *heap *, maintaining the heap
93101 invariant. If the heap is empty, :exc: `IndexError ` is raised. To access the
94102 largest item without popping it, use ``heap[0] ``.
95103
104+ .. versionadded :: next
105+
96106
97107.. function :: heappushpop_max(heap, item)
98108
99109 Push *item * on the heap, then pop and return the largest item from the
100110 *heap *. The combined action runs more efficiently than :func: `heappush_max `
101111 followed by a separate call to :func: `heappop_max `.
102112
103-
104- .. function :: heapify_max(x)
105-
106- Transform list *x * into a max heap, in-place, in linear time.
113+ .. versionadded :: next
107114
108115
109- .. function :: heapreplace (heap, item)
116+ .. function :: heapreplace_max (heap, item)
110117
111- Pop and return the smallest item from the *heap *, and also push the new *item *.
118+ Pop and return the largest item from the *heap *, and also push the new *item *.
112119 The heap size doesn't change. If the heap is empty, :exc: `IndexError ` is raised.
113120
114121 This one step operation is more efficient than a :func: `heappop ` followed by
@@ -121,6 +128,8 @@ The following functions are provided:
121128 combination returns the smaller of the two values, leaving the larger value
122129 on the heap.
123130
131+ .. versionadded :: next
132+
124133
125134The module also offers three general purpose functions based on heaps.
126135
0 commit comments