Skip to content

Conversation

jdemeyer
Copy link
Contributor

@jdemeyer jdemeyer commented May 16, 2018

Using inspect.isfunction is more future-compatible in case that the implementation of inspect.isfunction ever changes.

In SageMath, we actually monkey-patch inspect.isfunction to allow for Cython functions. So while this patch doesn't change anything at all in vanilla Python, it is important for Cython support.

More context:

@jdemeyer jdemeyer changed the title Use inspect instead of type checks signature: use inspect instead of type checks May 16, 2018
@Carreau
Copy link
Member

Carreau commented May 16, 2018

+1.

Do you think it is worth backporting to 5.x (Python 2.7), or can this be a carrot for 3.x users ?

@jdemeyer
Copy link
Contributor Author

It's a pull request to the 5.x branch. It only makes sense on Python 2.

@Carreau
Copy link
Member

Carreau commented May 16, 2018

Oh, sorry, I missread. Thanks.

@Carreau Carreau merged commit 8d399b9 into ipython:5.x May 16, 2018
@Carreau Carreau added this to the 5.8 milestone May 16, 2018
@Carreau
Copy link
Member

Carreau commented Jul 29, 2018

@jdemeyer released on PyPI, I'll update the conda recipe later.

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