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

Curried bug second attempt #75

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

cad106uk
Copy link

Following on from pull request 74. I have closed 74 and made this new pull request

I have limited the my pep8'ing to just the func.py file, where I have made 2 separate commits. One to fix the white spacing and one to fix the unused import. (Purely to appease my OCD)

I have made a new unit test to show exactly which bit of the curried functions where not be wrapped correct by the functools when creating a decorator.

I have applied the same bugfix as before, to use the functools to fix this problem.

The test run.

I hope that covers everything from your feedback.

Thank you.

@cad106uk cad106uk mentioned this pull request Aug 13, 2015
@@ -80,5 +81,8 @@ def _curried(*args, **kwargs):
if count == len(spec.args) - len(args):
return func(*args, **kwargs)

return curried(partial(func, *args, **kwargs))
para_func = partial(func, *args, **kwargs)
update_wrapper(para_func, f)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

f or func?

f was the iterator variable in the function loop, above. I suspect it's not the right choice here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants