-
Notifications
You must be signed in to change notification settings - Fork 17
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
@pipe_util usage #8
Comments
Hi! I probably need to describe this better in the documentation. The As you can see in the example you provided, just using it directly works fine! You can just import it as The only other feature that myflatten = X | more_itertools.flatten Also note that Also, for your first example, you don't need to explicitly define ... | foreach(len) | (functools.reduce, operator.add) Or in this particular case even better: ... | foreach(len) | sum So the main point is that you can just pipe regular functions and you shouldn't really need to use |
I'm trying to do some experiments with
pipetools
:and it works. But I'm trying to replace
flatten
withmore_itertools.flatten
for speed reason:with
more_itertools.flatten
takes 6.49 seconds, withflatten
13.68 seconds.I have tried with:
but it doesn't work, what am I missing?
Thanks
The text was updated successfully, but these errors were encountered: