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. Ordering is crucial when it comes to timers. Marko -- https://mail.python.org/mailman/listinfo/python-list