Paul Rubin wrote:
Brad <schi...@gmail.com> writes:
Maybe this would be difficult to get into the core, but how about this
idea: Rename the current filter function to something like "split" or
"partition" (which I agree may be a better name) and modify it to
return the desired true and false sequences. Then recreate the
existing "filter" function with a wrapper that throws away the false
sequence.

This isn't so attractive, since filter takes a sequence input but
returns a list.

In modern Python (py3), it returns an iterator.

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to