[Python-Dev] inspect.getargspec()

Ka-Ping Yee ping@zesty.ca
Thu, 7 Nov 2002 04:19:22 -0600 (CST)


On Wed, 6 Nov 2002, Patrick K. O'Brien wrote:
> Except the net (args required minus args given) is the same in both cases.
> Which would argue for not including self in the results of getargspec().
> Plus, you'll get an error if you try to explicitly pass the first argument.
> So while technically self *is* part of the argspec, I think in practice
> most applications will end up wanting to eliminate it because Python takes
> care of it implicitly.

I think it would make the most sense to display the signature you would
actually use when calling the method object.  That is, if the method is
unbound, then 'self' should appear.  If the method is bound, then 'self'
should not appear.


-- ?!ng