On 02/24/2015 05:56 PM, Gregory P. Smith wrote:
inspect.getargspec(method) and inspect.signature(method) both include
the 'self' parameter but how are we to figure out from method itself
that it is actually bound and that its first parameter is expected to
be a bound instance?
Given the
inspect.getargspec(method) and inspect.signature(method) both include the
'self' parameter but how are we to figure out from method itself that it is
actually bound and that its first parameter is expected to be a bound
instance?
So far I've come up with:
*inspect.ismethod(method) or
On 2/24/2015 8:56 PM, Gregory P. Smith wrote:
inspect.getargspec(method) and inspect.signature(method) both include
the 'self' parameter but how are we to figure out from method itself
that it is actually bound and that its first parameter is expected to be
a bound instance?
So far I've
On 2/24/2015 8:56 PM, Gregory P. Smith wrote:
inspect.getargspec(method) and inspect.signature(method) both include
the 'self' parameter but how are we to figure out from method itself
that it is actually bound and that its first parameter is expected to be
a bound instance?
This seems like a
On 2/24/2015 9:02 PM, Eric V. Smith wrote:
I'm not sure if it's correct, but deep in a library of mine I have:
elif type(fn) == types.MethodType:
# bound method?
if fn.im_self is None:
# no 'self'
nskip = 0
else:
# need to supply 'self'
nskip =