Can `findmin` use a counter if `keys` is not defined for an iterator?

Yes I think keys make more sense for Enumerate as the enumeration assigns a kind of ID to each value. And it makes sense that you can wrap any iterator with enumerate to gain this functionality. Otherwise you would have to define methods for all iterators. Or to also cover user iterators you would need to define a generic fallback Base.keys(it), which was turned down here for good reasons I think.

Also for the problem in this thread, defining only keys wouldn’t work for iterators that have no length defined, while enumerating the pairs always works.