Raymond Hettinger added the comment:

It is a bit late in the game for 2.7 micro-optimizations.

FWIW, I don't think these weren't oversights. There isn't really much of a use 
case for the bool filter for strings and unicode inputs.  And the case of tuple 
inputs isn't used much ("lists are for looping/filtering and tuples are like 
records in a DB or structs in C").

Since there is no bug here and we're trying to touch 2.7 as little as possible 
these days, I recommend closing as "not a bug" or "won't fix".

If optimizing uncommon cases is important for you, then just use "filter(None, 
iterable)" instead of "filter(bool, iterable)" or work with itertools.ifilter() 
and itertools.ifilterfalse().

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22451>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to