[issue17159] Remove explicit type check from inspect.Signature.from_function()

Stefan Behnel report at bugs.python.org
Fri Feb 14 00:43:29 CET 2014


Stefan Behnel added the comment:

> Oh, sound like a big hack.

Well, it's certainly a bunch of overhead (even assuming that "inspect" will
most likely be imported already - just looked it up in import.c, there's
lots of useless generic code there), with a lot of potential for something
going wrong, but it should still be somewhat acceptable. Certainly not time
critical. Having to maintain our own function type isn't exactly the most
simple way of going about it in the first place.

I just tried it, it adds some 20 lines of C code but works ok.

> Please take a look at the new patch 'sig_cython_latest'
> The change is really minimal, I think we can still push this in 3.4.

I'm certainly ok with it, given that I had already asked for that a while ago.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17159>
_______________________________________


More information about the Python-bugs-list mailing list