Aaron Watters wrote: > On Feb 29, 9:31 am, Robert Bossy <[EMAIL PROTECTED]> wrote: > >> Hi all, >> >> I thought it would be useful if insort and consorts* could accept the >> same options than list.sort, especially key and cmp..... >> > > Wouldn't this make them slower and less space efficient? It would > be fine to add something like this as an additional elaboration, but > I want bisect to scream as fast as possible in the default streamlined > usage. Yes it is slower and bigger, so I agree that the canonical implementation for default values should be kept. Also because the original bisect functions are actually written in C, the speed difference is even more noticeable.
Though, I needed custom ordering bisects since I was implementing interval trees (storing intervals by startpoint/endpoint). Cheers, RB -- http://mail.python.org/mailman/listinfo/python-list