def get_args(self, func):
        """
        Get the arguments of a method and return it as a dictionary with the
        supplied defaults, method arguments with no default are assigned None
        """
        def reverse(iterable):
            if iterable:
                iterable = list(iterable)
                while len(iterable):
                    yield iterable.pop()

        args, varargs, varkw, defaults = inspect.getargspec(func)
        result = {}
        for default in reverse(defaults):
            result[args.pop()] = default

        for arg in reverse(args):
            if arg == 'self':
                continue
            result[arg] = None

        return result
def get_args ( self , func ) : def reverse ( iterable ) : if iterable : iterable = list ( iterable ) while len ( iterable ) : yield iterable . pop ( ) args , varargs , varkw , defaults = inspect . getargspec ( func ) result = { } for default in reverse ( defaults ) : result [ args . pop ( ) ] = default for arg in reverse ( args ) : if arg == 'self' : continue result [ arg ] = None return result
Get the arguments of a method and return it as a dictionary with the
        supplied defaults, method arguments with no default are assigned None