On Sun, 10 Feb 2013 22:29:54 +1100, Steven D'Aprano wrote: > Rick Johnson wrote: > > map, mapped > > filter, filtered > > reduce, reduced > > Those are nonsense. None of those are in-place mutator methods. > Especially reduce, which reduces a list to a single item. You might > as well have suggested "len, "lened".
And, if you want those in-place, indexing trivially comes to the rescue again: lst[:] = map(transform_fn, lst) lst[:] = filter(check_fn, lst) or, as I prefer: lst[:] = [transform_fn(x) for x in lst] lst[:] = [x for x in lst if check_fn(x)] as they can be combined simply. -tkc -- http://mail.python.org/mailman/listinfo/python-list