Message256218
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.) |
|
Date |
User |
Action |
Args |
2015-12-11 15:02:01 | leewz | set | recipients:
+ leewz |
2015-12-11 15:02:00 | leewz | set | messageid: <1449846120.95.0.0940124187557.issue25840@psf.upfronthosting.co.za> |
2015-12-11 15:02:00 | leewz | link | issue25840 messages |
2015-12-11 15:02:00 | leewz | create | |
|