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

Add apply_defaults method to BoundArguments (from Python 3.5) #28

Open
BlckKnght opened this issue May 30, 2016 · 0 comments
Open

Add apply_defaults method to BoundArguments (from Python 3.5) #28

BlckKnght opened this issue May 30, 2016 · 0 comments

Comments

@BlckKnght
Copy link

Python 3.5 extended the inspect.BoundArguments class, adding a new apply_defaults method which updates arguments with default values for any parameters that haven't been bound yet.

See Python issue 24190 for the discussion and the patch implementing the change (including doc changes and tests). I've not tried it myself, but I suspect that patch should almost work for this backported version of the code as well. The additions to the main library code should be fine. The test code however might need to be simplified a tiny bit to avoid using features that don't exist in older Python versions (e.g. annotations).

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

1 participant