Another Python 3 fix.

This commit is contained in:
Murtuza Zabuawala authored and Dave Page committed 2017-01-31 12:12:22 +00:00
1 parent fd53e0c527
commit 0da8d1fe4c
1 file changed
+6 -1
+6 -1
View File
@@ -3,7 +3,12 @@ Copied from http://code.activestate.com/recipes/576611-counter-class/
"""
from heapq import nlargest
from itertools import repeat, ifilter
from itertools import repeat
try:
from itertools import ifilter
except ImportError:
# ifilter is in-built function in Python3 as filter
ifilter = filter
from operator import itemgetter