-
-
Notifications
You must be signed in to change notification settings - Fork 572
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
Show signature for binding=False cython functions #39279
base: develop
Are you sure you want to change the base?
Conversation
sage: def f(x, y, z=1, t=2, *args, **keywords): | ||
....: pass | ||
sage: sage_signature(f) | ||
<Signature (x, y, z=1, t=2, *args, **keywords)> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
examples mostly copied from sage_getargspec, modified accordingly.
Documentation preview for this PR (built with commit d641e4b; changes) is ready! 🎉 |
Would this be much work? Since this seems to be 'just' a cython-specific problem, and nothing intrinsically related to sage, I would prefer if this could be fixed upstream in IPython (in fact, I hope that most of the special Cython handling in |
Might be worth trying, let's see. |
Fixes #26254 , without binding=True. (That is, this shows the signature correctly in
function?
for certain functions compiled in Cython.)Before:
After:
Even if we ultimately decide to set binding=True, this would probably still be desirable, in case some other library chooses to use binding=False, embedsignature=True.
Note: there's an alternative of implementing this into IPython, see ipython/ipython#14639
📝 Checklist