Christian Heimes wrote: >>def index(self, obj, predicate=operator.eq): >> for idx, item in enumerate(self): >> if predicate(item, obj): >> return idx >> raise IndexError This looks more like it belongs in the itertools module, if there isn't something there already that does it. -- Greg