On Apr 7, 2016 10:22 PM, "Marko Rauhamaa" <ma...@pacujo.net> wrote: > > Ian Kelly <ian.g.ke...@gmail.com>: > > > On Thu, Apr 7, 2016 at 1:32 PM, Marko Rauhamaa <ma...@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. -- https://mail.python.org/mailman/listinfo/python-list