1 |
# -*- coding: utf-8 -*-
|
|
2 |
|
|
3 |
from __future__ import division, print_function |
8✔ |
4 |
|
|
5 |
__all__ = ["DefaultPool"]
|
8✔ |
6 |
|
|
7 |
try:
|
8✔ |
8 |
from itertools import imap |
8✔ |
9 |
except ImportError: |
4 only 291.3, 291.4, NUMPY_VERSION=1.8, and NUMPY_VERSION=1.7 ✔ |
10 |
imap = map
|
4 only 291.3, 291.4, NUMPY_VERSION=1.8, and NUMPY_VERSION=1.7 ✔ |
11 |
|
|
12 |
|
|
13 |
class DefaultPool(object): |
8✔ |
14 |
|
|
15 |
def map(self, fn, iterable): |
8✔ |
16 |
return imap(fn, iterable)
|
8✔ |