List of steps to reproduce (step by step, including full links if applicable):
- Add a print statement in front of the early return in line 925
- use this code snippet:
>>> import pwb, pywikibot as py
>>> from pywikibot.tools import intersect_generators as isg
>>> list(isg('B', 'ABBBBBBBBBBBBBBBBBBBB'))
[B]
>>> list(isg('B', 'ABBBBBBBBBBBBBBBBBBBB', allow_duplicates=True))
['B']What happens?:
The print statement is never printed and the early return is never used. Anyway the result is as expected.
What should have happened instead?:
Early return the function if there is only one active iterable and the counter has no remaining entry of the other iterables