[issue4424] Add support for a cmp, or key argument to heapq functions.

2013-04-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- superseder: -> Add key argument to heapq functions type: -> enhancement ___ Python tracker ___ ___ P

[issue4424] Add support for a cmp, or key argument to heapq functions.

2008-11-24 Thread Alex
Alex <[EMAIL PROTECTED]> added the comment: Apologies, searching didn't yield that. That's not necessarily always easy, for example I'd like to use heapq to merge iterators coming from the database. ___ Python tracker <[EMAIL PROTECTED]>

[issue4424] Add support for a cmp, or key argument to heapq functions.

2008-11-24 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: This is a duplicate of a previously rejected request. The usual approach is to load the heap with (priority, record) tuples. -- nosy: +rhettinger resolution: -> duplicate status: open -> closed __

[issue4424] Add support for a cmp, or key argument to heapq functions.

2008-11-24 Thread Alex
New submission from Alex <[EMAIL PROTECTED]>: Currently the heapq module can only really be used if your data has it's own ordering defined. There is no way to do a custom ordering. From my cursory review of the code it looks like some of the lower level functions actually take these kwargs, bu