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


Groups > comp.lang.python > #106640

Re: how to convert code that uses cmp to python3

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Ian Kelly <ian.g.kelly@gmail.com>
Newsgroups comp.lang.python
Subject Re: how to convert code that uses cmp to python3
Date Thu, 7 Apr 2016 22:37:00 -0600
Lines 22
Message-ID <mailman.62.1460090229.2253.python-list@python.org> (permalink)
References <57064D0D.1030701@rece.vub.ac.be> <CAPTjJmrGiQS9uhFU-+TQ4nUWQ2p4gmJoQitMotS0Ob--qm1iWg@mail.gmail.com> <mailman.22.1460031736.2253.python-list@python.org> <87a8l5p6ek.fsf@nightsong.com> <874mbdi5ai.fsf@elektro.pacujo.net> <CALwzid==D4+ADD5fpzOG_8RQ+jqp0Bnn+wZay7SWuLRrPRpA4g@mail.gmail.com> <mailman.60.1460069789.2253.python-list@python.org> <87twjchgyd.fsf@elektro.pacujo.net> <CALwzid=+OsQZfdhEQ4PPuBO8YeQAXMHR_6Sty3PH3q44YqJzRQ@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de VP4uJe8gPWtMKthnCNfSqgUUPhTX8lSNtYDngPg9J2BQ==
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.019
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'subject:code': 0.07; 'objects.': 0.09; 'trees': 0.09; 'thu,': 0.15; '2016': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:python3': 0.16; 'wrote:': 0.16; 'implementing': 0.18; '&gt;': 0.18; 'keys': 0.22; 'seems': 0.23; 'elements': 0.23; 'insert': 0.23; 'header:In- Reply-To:1': 0.24; 'message-id:@mail.gmail.com': 0.27; 'subject:that': 0.29; "i'm": 0.30; 'that.': 0.30; 'implement': 0.32; 'received:google.com': 0.35; 'could': 0.35; 'important.': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:209.85.213': 0.37; 'times.': 0.38; 'received:209': 0.38; 'why': 0.39; 'to:addr:python.org': 0.40; 'ever': 0.60; 'expiry': 0.84; 'to:name:python': 0.84; 'crucial': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=BK8aMLh/rE61RIsk89s2CEo7scEWZCaBn4fxt406IwQ=; b=OKaSwFuHUQ3yaN9WbB4Nmttp1mwTg+QMxauYTS+oEHmxiy+z3jNJOvy5AtAyj8N8fU 1Wkcy4pd+EyKzj1FquEOoI3eFRmgBe/dziWU/wMMufCeslvGYmK6L4cYBQxMIkJaaqdO B70FuQn93k/PRn0hfTnYkpfEOnAHQLa3mLZB8vMJJ5szYpt9dGjVqJFE6rzyUtiTKwXD aCzP9tBlnUy7xsvkvrAXbt89LJURgbYV8E+i4sw1U3I16+OPa2pwf6RiyJaZZTexCd3C gRlKExijSIjlsAYvJ0zoBzK1qTnEqbYDjPNfWODttQpns0/SFzkn5FLD+Krf2kS9VQEu WerA==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=BK8aMLh/rE61RIsk89s2CEo7scEWZCaBn4fxt406IwQ=; b=c9tXV7GmuIFVouOyUcUhS9XiAqxO95hQg+FWMeLPC34rIcGHJYdYK/PP1MVTEjNoSg ztBsWzuJrHehI2rKl90zkuN866p858XfSX3pKuOEH6PHag/gWlPbR0gfb19c+rojUx44 1BYNz8JLeS0Ca6gWrrmZMXX/vCDxJIqmmJ6fCCy6pRnfIHNGIfKP0QZIJhB/zjt96jkG gjdnNNH7pogpknikBE0ef91f6teAK1V/9cbU+i7RrBJhWodedyWqoKGVT+ZJwaNRa76G qRl7zlRpXlH5hsU91OtS2pFPsy1wdeTepzX4h+CK0swlbD3u4N4002XfY56x2IvFAUGN rGZA==
X-Gm-Message-State AD7BkJJX7TiT5D+fxqVJarkTDEo7JpjmvTPy8rPzR2RIPdFJoCgHqC2Bh/TDVzGrWzAudgQCnJqNJ+qeoVCzFg==
X-Received by 10.50.67.113 with SMTP id m17mr1266132igt.52.1460090220560; Thu, 07 Apr 2016 21:37:00 -0700 (PDT)
In-Reply-To <87twjchgyd.fsf@elektro.pacujo.net>
X-Content-Filtered-By Mailman/MimeDel 2.1.21
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21
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>
X-Mailman-Original-Message-ID <CALwzid=+OsQZfdhEQ4PPuBO8YeQAXMHR_6Sty3PH3q44YqJzRQ@mail.gmail.com>
X-Mailman-Original-References <57064D0D.1030701@rece.vub.ac.be> <CAPTjJmrGiQS9uhFU-+TQ4nUWQ2p4gmJoQitMotS0Ob--qm1iWg@mail.gmail.com> <mailman.22.1460031736.2253.python-list@python.org> <87a8l5p6ek.fsf@nightsong.com> <874mbdi5ai.fsf@elektro.pacujo.net> <CALwzid==D4+ADD5fpzOG_8RQ+jqp0Bnn+wZay7SWuLRrPRpA4g@mail.gmail.com> <mailman.60.1460069789.2253.python-list@python.org> <87twjchgyd.fsf@elektro.pacujo.net>
Xref csiph.com comp.lang.python:106640

Show key headers only | View raw


On Apr 7, 2016 10:22 PM, "Marko Rauhamaa" <marko@pacujo.net> wrote:
>
> Ian Kelly <ian.g.kelly@gmail.com>:
>
> > On Thu, Apr 7, 2016 at 1:32 PM, Marko Rauhamaa <marko@pacujo.net> wrote:
> >> I use AVL trees to implement timers. You need to be able to insert
> >> elements in a sorted order and remove them quickly.
> >
> > Why would AVL trees implementing timers ever need non-numeric keys
> > though?
> >
> > It seems to me that if you're mixing types like this then the ordering
> > is likely not actually important.
>
> The keys are expiry times. You could use numbers or you could use
> datetime objects.

Yes, but why would you want to use both?

> Ordering is crucial when it comes to timers.

I'm not disputing that.

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


Thread

Re: how to convert code that uses cmp to python3 Paul Rubin <no.email@nospam.invalid> - 2016-04-07 12:26 -0700
  Re: how to convert code that uses cmp to python3 Marko Rauhamaa <marko@pacujo.net> - 2016-04-07 22:32 +0300
    Re: how to convert code that uses cmp to python3 Paul Rubin <no.email@nospam.invalid> - 2016-04-07 14:15 -0700
      Re: how to convert code that uses cmp to python3 Marko Rauhamaa <marko@pacujo.net> - 2016-04-08 07:22 +0300
        Re: how to convert code that uses cmp to python3 Terry Reedy <tjreedy@udel.edu> - 2016-04-08 02:20 -0400
          Re: how to convert code that uses cmp to python3 Marko Rauhamaa <marko@pacujo.net> - 2016-04-08 09:53 +0300
            Re: how to convert code that uses cmp to python3 Paul Rubin <no.email@nospam.invalid> - 2016-04-08 00:03 -0700
              Re: how to convert code that uses cmp to python3 Marko Rauhamaa <marko@pacujo.net> - 2016-04-08 10:40 +0300
                Re: how to convert code that uses cmp to python3 Paul Rubin <no.email@nospam.invalid> - 2016-04-08 01:43 -0700
    Re: how to convert code that uses cmp to python3 Marko Rauhamaa <marko@pacujo.net> - 2016-04-08 07:17 +0300
      Re: how to convert code that uses cmp to python3 Ian Kelly <ian.g.kelly@gmail.com> - 2016-04-07 22:37 -0600
        Re: how to convert code that uses cmp to python3 Marko Rauhamaa <marko@pacujo.net> - 2016-04-08 08:00 +0300
    Re: how to convert code that uses cmp to python3 Terry Reedy <tjreedy@udel.edu> - 2016-04-08 02:12 -0400

csiph-web