[Numpy-discussion] Remove numpy/compat/_inspect.py ?
Charles R Harris
charlesr.harris at gmail.com
Fri Aug 1 07:57:47 EDT 2014
On Thu, Jul 31, 2014 at 11:46 PM, David Cournapeau <cournape at gmail.com>
> The docstring at the beginning of the module is still relevant AFAIK: it
> was about decreasing import times. See
> On Fri, Aug 1, 2014 at 10:27 AM, Charles R Harris <
> charlesr.harris at gmail.com> wrote:
>> Hi All,
>> The _inspect.py function looks like a numpy version of the python inspect
>> function. ISTR that is was a work around for problems with the early python
>> versions, but that would have been back in 2009.
It's only used in one function.
Get the signature from obj
sig = formatargspec(*getargspec(obj))
except TypeError as errmsg:
sig = ''
# msg = "Unable to retrieve the signature of %s '%s'\n"\
# "(Initial error message: %s)"
# warnings.warn(msg % (type(obj),
# getattr(obj, '__name__', '???'),
Where a local import would do as well. It also has bugs, so evidently isn't
called often ;)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion