From: Berend de B. <be...@po...> - 2008-03-20 21:04:03
|
>>>>> "Eric" == Eric Bezault <er...@go...> writes: Eric> Well, in fact to iterate only on keys I guess we can do Eric> `my_table.keys.do_all'... So, we might need only two kinds of Eric> iterators after all. What about `do_all' and Eric> `do_all_with_key', the latter being similar to Eric> `do_all_with_index'? Or for_each which gives both item and key, and for_each_item which only does the item? What I try to come up with is the shortest name, the default, for the most common method. And a slightly longer for the other. Or else, a name with both key and item is longer, so make it the default when nothing is in the feature name, as it is really hard to indicate you get both, so you can put that in the comments. And iterating while receiving a single feature is then simply for_each_item/for-each_key. -- All the best, Berend de Boer |