Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Random832 Newsgroups: comp.lang.python Subject: Re: Sorting a list Date: Mon, 04 Apr 2016 09:40:42 -0400 Lines: 8 Message-ID: References: <1459777242.3422585.568322458.4B66944D@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 05YOolFaHGLiqCcIWsWSngXk1qIxPILbcsAp7C7RzaLA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'operator': 0.03; 'type,': 0.07; 'received:internal': 0.09; 'message- id:@webmail.messagingengine.com': 0.16; 'negation': 0.16; 'orderable': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:66.111.4.27': 0.16; 'received:io': 0.16; 'received:messagingengine.com': 0.16; 'received:out3-smtp.messagingengine.com': 0.16; 'received:psf.io': 0.16; 'reversed': 0.16; 'wrote:': 0.16; 'second': 0.24; 'header :In-Reply-To:1': 0.24; 'mon,': 0.24; 'subject:list': 0.26; 'though.': 0.33; "isn't": 0.35; 'but': 0.36; 'there': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'thought': 0.37; 'received:66': 0.38; 'why': 0.39; 'does': 0.39; 'well.': 0.40; 'to:addr:python.org': 0.40; 'header:Message- Id:1': 0.61; 'otten': 0.84 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=uBOyt2ptzw+taiGq2+2bRBxWiLw=; b=ul2Ub1 XFu7ErPOTXZ6Q+Hk2do2qpapxrKevX/I4s1ujrGX/FKReRu0CqJkfeO1r3Ym2qVU wftFFYCPv3ynuWGQ59XOulGqEiRd1dnS26zJwpsrBKBx8TNAI9EFv9JUFKdKXx6w 3wvGYZEJYF9dFT2LFf14jLdrBSGA+NhQXWKXI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=uBOyt2ptzw+taiG q2+2bRBxWiLw=; b=YehEoa65LOYWGrA93xhkSJGQakMwTSadwRwG1UxRC6ZV6as Yr4Qh5UJUtk9al5LZkkwPSQUdmGN46SK7XsNtGsIIyXCZ+eSHqtXN6NoVYXx27A8 mVOEfqVlFIip4uehSpA9gJlUKSYwSf2cdT+issvZKMVyLO/CfXHtLnqMhvU0= X-Sasl-Enc: xFPRCDmmLjQlKNKMdlPOw2MYqIPWLJd7KiXyJNypFg3H 1459777242 X-Mailer: MessagingEngine.com Webmail Interface - ajax-2373d6a1 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <1459777242.3422585.568322458.4B66944D@webmail.messagingengine.com> X-Mailman-Original-References: Xref: csiph.com comp.lang.python:106438 On Mon, Apr 4, 2016, at 02:56, Peter Otten wrote: > > That works well. Why is it 'cheating'? > > On second thought it isn't ;) It does require a numeric type, though. There are lots of types that are orderable but do not have a negation operator that provides a key with reversed ordering.