This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients gpolo, rhettinger
Date 2008-03-24.08:13:39
SpamBayes Score 0.138213
Marked as misclassified No
Message-id <1206346421.05.0.0301842124744.issue1904@psf.upfronthosting.co.za>
In-reply-to
Content
Rejecting the key-function patch in favor of the current typical 
approach of heapifying tuples that link a priority level with 
individual records.  I've been a heavy user of the module and one of 
its principal maintainers.  To date, I've seen very little need for key-
function argument.

Use cases aside, there is another design issue in that the key-function 
approach doesn't work well with the heap functions on regular lists.  
Successive calls to heap functions will of necessity call the key-
function multiple times for any given element.  This contrasts with sort
() where the whole purpose of the key function was to encapsulate the 
decorate-sort-undecorate pattern which was desirable because the key-
function called exactly once per element.
History
Date User Action Args
2008-03-24 08:13:41rhettingersetspambayes_score: 0.138213 -> 0.138213
recipients: + rhettinger, gpolo
2008-03-24 08:13:41rhettingersetspambayes_score: 0.138213 -> 0.138213
messageid: <1206346421.05.0.0301842124744.issue1904@psf.upfronthosting.co.za>
2008-03-24 08:13:40rhettingerlinkissue1904 messages
2008-03-24 08:13:39rhettingercreate