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

Single-argument functions cannot be called using keyword #3090

Open
jdemeyer opened this issue Aug 22, 2019 · 3 comments

Comments

@jdemeyer
Copy link
Contributor

commented Aug 22, 2019

In [1]: %load_ext cython

In [2]: %%cython
   ...: def f(k): return k

In [3]: f(k=1)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-3-2f40ef43e783> in <module>()
----> 1 f(k=1)

TypeError: f() takes no keyword arguments
@jdemeyer

This comment has been minimized.

Copy link
Contributor Author

commented Aug 22, 2019

The problem is very obvious in retrospect: single-argument functions use METH_O which do not accept keywords. The question is what to do with this, given that nobody complained about this so far. I only found this out when trying some edge-cases for #3021.

@scoder

This comment has been minimized.

Copy link
Contributor

commented Aug 22, 2019

@scoder scoder added the R: wontfix label Aug 23, 2019

@scoder scoder closed this Aug 23, 2019

@scoder scoder removed the R: wontfix label Aug 23, 2019

@scoder scoder added this to the 3.0 milestone Aug 23, 2019

@scoder

This comment has been minimized.

Copy link
Contributor

commented Aug 23, 2019

Hmm, on second thought, I wonder if it's worth changing the default setting, now that we have all that fast-calling integration?

@scoder scoder reopened this Aug 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.