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

Always bind Cython functions #3106

merged 2 commits into from Aug 28, 2019


Copy link

@jdemeyer jdemeyer commented Aug 28, 2019

Currently, when defining a CyFunction with @staticmethod, this does two things:

  1. It wraps the function inside a staticmethod.
  2. It sets the flag __Pyx_CYFUNCTION_STATICMETHOD in the CyFunction, which prevents __get__ from creating a bound method.

Only one of these is sufficient to have correct semantics for a static method. For consistency with Python, we should only do 1. and not 2. The same for class methods.

Depends on #3102

@scoder scoder added this to the 3.0 milestone Aug 28, 2019
@scoder scoder merged commit 8282f3f into cython:master Aug 28, 2019
@jdemeyer jdemeyer deleted the CyFunction_descr_get branch August 28, 2019 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants