]> granicus.if.org Git - python/commit
Added new heapreplace(heap, item) function, to pop (and return) the
authorTim Peters <tim.peters@gmail.com>
Sat, 3 Aug 2002 10:10:10 +0000 (10:10 +0000)
committerTim Peters <tim.peters@gmail.com>
Sat, 3 Aug 2002 10:10:10 +0000 (10:10 +0000)
commit0cd53a6c37347800f786c4ddaa2e91af30350b5a
treeae92812f3269876a3aec224f6374be09b19cbc27
parent657fe38241a7f072bdbf040a7bd05df96f326c5c
Added new heapreplace(heap, item) function, to pop (and return) the
currently-smallest value, and add item, in one gulp.  See the second
N-Best algorithm in the test suite for a natural use.
Lib/heapq.py
Lib/test/test_heapq.py