[New-bugs-announce] [issue20407] heapq.nsmallest and heapq.nlargest don't accept a "key" parameter

Larry Hastings report at bugs.python.org
Mon Jan 27 12:51:33 CET 2014


New submission from Larry Hastings:

The documentation for heapq.nsmallest and heapq.nlargest:

http://docs.python.org/3.3/library/heapq.html#heapq.nlargest

claim that they accept three arguments: n, iterable, and key=None.  In fact, the implementations of both these functions only accept two parameters: n and iterable.

I assume the right thing to do here is to remove the erroneous documentation, rather than implement this apparently-not-needed feature?

----------
components: Library (Lib)
messages: 209435
nosy: larry
priority: low
severity: normal
stage: needs patch
status: open
title: heapq.nsmallest and heapq.nlargest don't accept a "key" parameter
type: behavior
versions: Python 3.3, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20407>
_______________________________________


More information about the New-bugs-announce mailing list