Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #106638
| From | Marko Rauhamaa <marko@pacujo.net> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: how to convert code that uses cmp to python3 |
| Date | 2016-04-08 07:17 +0300 |
| Organization | A noiseless patient Spider |
| Message-ID | <87twjchgyd.fsf@elektro.pacujo.net> (permalink) |
| References | (2 earlier) <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> |
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. Ordering is crucial when it comes to timers. Marko
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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