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:
parent
718e934184
commit
d6a16862ac
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user