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

Feature Request: version of bind that preserves signature #35

Closed
juan-carlos-calvo opened this issue May 2, 2020 · 1 comment
Closed

Comments

@juan-carlos-calvo
Copy link

juan-carlos-calvo commented May 2, 2020

bind's signature after binding a function is <Signature (*args, **kwargs)> . Could it be possible to please have a version of it that gives back a function (or bind object) with the right signature after binding? for example:
for def foo(a: int, b: str, c: float, d: str='hey'): pass
its signature is <Signature (a: int, b: str, c: float, d: str = 'hey')>
and if I define bf = bind(foo, 1, _Arg(0), 2)
I would like to have bfs signature be <Signature (b: str, d: str = 'hey')>

@sgugger
Copy link
Contributor

sgugger commented May 2, 2020

Please use the forum for feature requests as we keep the issues for bug only.

@sgugger sgugger closed this as completed May 2, 2020
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

No branches or pull requests

2 participants