Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #89457

heapq - why no key= arg?

Path csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.023
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'suppose': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'customizing': 0.16; 'key=': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:key': 0.16; 'header :User-Agent:1': 0.23; 'header:X-Complaints-To:1': 0.27; 'operations,': 0.30; 'comparison': 0.31; 'subject:?': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'skip:u 10': 0.60; 'such': 0.63; 'skip:n 10': 0.64; 'provide': 0.64; 'repeat': 0.74; 'received:139': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Neal Becker <ndbecker2@gmail.com>
Subject heapq - why no key= arg?
Date Mon, 27 Apr 2015 09:54:51 -0400
Mime-Version 1.0
Content-Type text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding 7Bit
X-Gmane-NNTP-Posting-Host exa2-in-fw-01-epn.hns.com
User-Agent KNode/4.14.6
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.43.1430142902.3680.python-list@python.org> (permalink)
Lines 8
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1430142902 news.xs4all.nl 2911 [2001:888:2000:d::a6]:48869
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:89457

Show key headers only | View raw


Looking at heapq, I see only nlargest/nsmallest provide a key= arg.  What 
about other operations, such as heapify?  Am I not understanding something?  
I suppose for other ops, such as heapify, I can only customize comparison by 
customizing the object comparison operators?

-- 
Those who fail to understand recursion are doomed to repeat it

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

heapq - why no key= arg? Neal Becker <ndbecker2@gmail.com> - 2015-04-27 09:54 -0400

csiph-web