You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good point. Generators uses exceptions internally. we would need to clone the generator first (itertools.tee) and then catch anything other than the StopIteration or GeneratorExit exception.
Activity
RonnyPfannschmidt commentedon Apr 23, 2017
retry for generators breaks flow expectations, how would it correctly know what to do after say failure after the 5th item
heri16 commentedon Apr 25, 2017
Good point. Generators uses exceptions internally. we would need to clone the generator first (itertools.tee) and then catch anything other than the StopIteration or GeneratorExit exception.
RonnyPfannschmidt commentedon Apr 25, 2017
and that would have unexpected cost and side-effects as well
untulis commentedon Oct 20, 2022
Would you accept a documentation PR to clarify this?
jpmarques19 commentedon Feb 1, 2025
I would
feat: support retrying generator and async generator functions
docs: document generator limitations and argument caveats
docs: document generator limitations and argument caveats (#612)