diff --git a/tests/tests_itertools.py b/tests/tests_itertools.py index bfb6eb2c..96de99ff 100644 --- a/tests/tests_itertools.py +++ b/tests/tests_itertools.py @@ -13,8 +13,7 @@ class NoLenIter(object): self._it = iterable def __iter__(self): - for i in self._it: - yield i + yield from self._it def test_product(): diff --git a/tqdm/std.py b/tqdm/std.py index e81c8368..665398f4 100644 --- a/tqdm/std.py +++ b/tqdm/std.py @@ -1165,8 +1165,7 @@ class tqdm(Comparable): # If the bar is disabled, then just walk the iterable # (note: keep this check outside the loop for performance) if self.disable: - for obj in iterable: - yield obj + yield from iterable return mininterval = self.mininterval