New submission from leewz: Meaning:
filter(False, lst) == (x for x in lst if not x) == itertools.filterfalse(None, lst) I understand that it is a very minor enhancement, and with not much benefit. I just happened to think about it, and wondered why it didn't already exist. I figured it wouldn't hurt to put the idea out here. (If anyone is interested, I was looking into ways that filter/map/itertools could "unwrap" each other at the C level to improve composition of generators, inspired by the functools.partial optimization.) ---------- messages: 256218 nosy: leewz priority: normal severity: normal status: open title: Allow `False` to be passed to `filter` type: enhancement versions: Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25840> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com