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

Support partial with keyword arguments #13

Open
sdvillal opened this issue Jan 29, 2017 · 0 comments
Open

Support partial with keyword arguments #13

sdvillal opened this issue Jan 29, 2017 · 0 comments
Assignees
Labels

Comments

@sdvillal
Copy link
Owner

Currently the strings generated for partials over functions accepting keyword arguments are wrong, or better said, oververbose.

from whatami import what2id
from functools import partial

def f(x, **kwargs):
    return None

fp = partial(f, a=3)
print(what2id(fp))

# Prints:
#   partial(args=(),func=f(),keywords={'a':3})
# Should print:
#   f(a=3)

Also the whatable decorator fails.

@sdvillal sdvillal self-assigned this Jan 29, 2017
@sdvillal sdvillal added the bug label Jan 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant