> (1) building another throwaway list and > (2) function call overhead for calling doit() > > You can avoid (1) by using filter() instead of map()
Are you sure of this? My python returns, when asked for help(filter) : Help on built-in function filter in module __builtin__: filter(...) filter(function or None, sequence) -> list, tuple, or string Return those items of sequence for which function(item) is true. If function is None, return the items that are true. If sequence is a tuple or string, return the same type, else return a list. I'm afraid there is no builtin function to do an inplace modification of a sequence... -- (\__/) ( O.o) ( > <) Este es Conejo. Copia a Conejo en tu firma y ayúdale en sus planes de dominación mundial. -- http://mail.python.org/mailman/listinfo/python-list