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

sage_getargspec on Cython class instances prefers __init__ over __call__ #20860

Open
jdemeyer opened this issue Jun 21, 2016 · 0 comments
Open

Comments

@jdemeyer
Copy link

The following Cython code

cimport cython
@cython.embedsignature(True)
cdef class MyClass(object):
    def __init__(self, x):
        pass
        
    def __call__(self, y):
        pass
        
from sage.misc.sageinspect import sage_getargspec
print(sage_getargspec(MyClass("hello")))

gives the argspec of __init__ instead of __call__:

ArgSpec(args=['x'], varargs=None, keywords=None, defaults=None)

CC: @simon-king-jena @nthiery

Component: documentation

Issue created by migration from https://trac.sagemath.org/ticket/20860

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants