Skip to content

Add support for **kwargs #53

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

Merged
merged 1 commit into from
Apr 22, 2022

Conversation

philipturner
Copy link
Contributor

This is yet another spawn of Swift-Colab. I modified the internal representation of PyFunction to store an opaque function pointer that casts to two different types. There is also a new method on PythonObject and ThrowingPythonObject, but that does not interfere with the existing dynamicCallable functionality. Furthermore, I future-proofed PythonKit against any solutions to SR-15871.

I did make some minor modifications to code style. One was ensuring the first line in a function was indented once. Previously, it could be indented twice if there was a where clause. Also, I changed params to args in closures for declaration of PythonFunction.

@philipturner philipturner changed the title Add support for keyword arguments Add support for **kwargs Apr 2, 2022
@philipturner
Copy link
Contributor Author

Are the changes to line indentation acceptable, or should I revert them?

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