-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chain_with for lazy second iterator construction #370
Comments
This is pretty much |
Ran into this pattern while chaining an |
I think it has some value and I see it received some likes. |
I'm unsure if this is really tied to |
True, I'm now unsure this should be done. |
It might be useful to add a chain_with function to the itertools that does the same thing as chain but lazily calling the function that builds the iterator.
This would make chaining with iterators computed in another thread easier.
The workaround described here is somewhat limited because
map
is not anFnOnce
even though the way it is used provides the guarantee it will only be used once.The text was updated successfully, but these errors were encountered: