Can I overload the compare (cmp()) function for a Lists ([]) index function?

xkenneth xkenneth at gmail.com
Fri Sep 28 13:30:52 EDT 2007


Looking to do something similair. I'm working with alot of timestamps
and if they're within a couple seconds I need them to be indexed and
removed from a list.
Is there any possible way to index with a custom cmp() function?

I assume it would be something like...

list.index(something,mycmp)

Thanks!




More information about the Python-list mailing list