python3: itertools.ifilter() doesn't exist

Signed-off-by: Satoshi KOBAYASHI <satoshi-k@iij.ad.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
Satoshi KOBAYASHI 2015-11-10 12:33:29 +09:00 committed by FUJITA Tomonori
parent 718e934184
commit d6a16862ac

View File

@ -124,7 +124,7 @@ def datum_from_string(type_, value_string, symtab=None):
def ifind(pred, seq):
try:
return itertools.ifilter(pred, seq).next()
return next(filter(pred, seq))
except StopIteration:
return None