diff options
Diffstat (limited to 'taskflow/utils/iter_utils.py')
-rw-r--r-- | taskflow/utils/iter_utils.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/taskflow/utils/iter_utils.py b/taskflow/utils/iter_utils.py index 8591d23..ebf4107 100644 --- a/taskflow/utils/iter_utils.py +++ b/taskflow/utils/iter_utils.py @@ -15,15 +15,13 @@ # under the License. from collections import abc +import functools import itertools -import six -from six.moves import range as compat_range - def _ensure_iterable(func): - @six.wraps(func) + @functools.wraps(func) def wrapper(it, *args, **kwargs): if not isinstance(it, abc.Iterable): raise ValueError("Iterable expected, but '%s' is not" @@ -147,5 +145,5 @@ def iter_forever(limit): while True: yield next(i) else: - for i in compat_range(0, limit): + for i in range(0, limit): yield i |