[issue1904] Add key argument to heapq functions

2008-03-24 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: 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

[issue1904] Add key argument to heapq functions

2008-01-22 Thread Guido van Rossum
Changes by Guido van Rossum: -- assignee: -> rhettinger keywords: +patch nosy: +rhettinger priority: -> low __ Tracker <[EMAIL PROTECTED]> __

[issue1904] Add key argument to heapq functions

2008-01-22 Thread Guilherme Polo
Guilherme Polo added the comment: Adding a simple patch that adds the "key" argument. To test this you need to comment lines where it tries to import the C version of heapq. Added file: http://bugs.python.org/file9260/heapq_key.py.patch __ Tracker <[EMAIL PROTECT

[issue1904] Add key argument to heapq functions

2008-01-22 Thread Guilherme Polo
New submission from Guilherme Polo: Wouldn't it be useful to add a "key" argument to some heapq functions ? So you could construct a heap from dict items list based on the second item of each tuple, for example. -- components: Library (Lib) messages: 61496 nosy: gpolo severity: normal st