Guido van Rossum added the comment:

>  What do you guys think about just making the predicate argument optional?
>
>    filter([-2,0,2]) --> -2, 2
>    filter(pred, iterable)
>
>  One arg is the first case and two args is the second case.

-1. Apart from range() this is used nowhere else in Python. (Well, it
is in curses, but it's an abomination there too.) I'd rather keep
explicit None that *this*, though I really don't see what's wrong with
filter(bool, ...) -- you can even optimize for that pattern.

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2186>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to