Skip to content
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

Import from the curried versions of toolz #136

Open
carver opened this issue Sep 28, 2018 · 1 comment
Open

Import from the curried versions of toolz #136

carver opened this issue Sep 28, 2018 · 1 comment

Comments

@carver
Copy link
Collaborator

carver commented Sep 28, 2018

What was wrong?

eth_utils.toolz does not provide access to the curried versions of the methods

How can it be fixed?

Add another eth_utils.curried.toolz module like the eth_utils.toolz one, but importing from toolz.curried.*.

Add smoke tests for at least one method from each subsection of https://toolz.readthedocs.io/en/latest/api.html -- like:

from eth_utils.curried.toolz import drop
drop2 = drop(2)
assert list(drop2([4, 3, 2, 1])) == [2, 1]

Should also smoke test that non-curryable functions are working, like:

from eth_utils.curried.toolz import compose
hexint = compose(hex, int)
assert hexint('10') == '0xa'
@reedsa
Copy link
Contributor

reedsa commented Oct 2, 2023

@fselmo @pacrob looks like above mentioned eth_utils.curried.toolz as the namespace but it seems backwards. Should we instead implement eth_utils.toolz.curried, to match that of tools.curried?

Once the decision is made I'll go ahead and knock this out.

@reedsa reedsa added the p3 label Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants