X Tutup
Skip to content

Commit 2afe1d0

Browse files
committed
Python 3 compatible ifilter
1 parent eeb2b89 commit 2afe1d0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bpython/importcompletion.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@
2929
import sys
3030
import warnings
3131
from warnings import catch_warnings
32-
from itertools import ifilter
32+
33+
if py3:
34+
ifilter = filter
35+
else:
36+
from itertools import ifilter
3337

3438
if sys.version_info[0] == 3 and sys.version_info[1] >= 3:
3539
import importlib.machinery

0 commit comments

Comments
 (0)
X Tutup