Method argument names

Bruno Desthuilliers onurb at xiludom.gro
Wed Nov 22 14:38:56 CET 2006


martinskou at gmail.com wrote:
> Hi
> 
> Having a method:
> 
> def method(self,x,y):
> 
> is it possible to discover, from outside the method, that the methods
> arguments are ['self', 'x', 'y']?

import inspect
help(inspect.getargspec)

HTH
-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list