def visit_arguments(self, node, parent):
        """visit an Arguments node by returning a fresh instance of it"""
        vararg, kwarg = node.vararg, node.kwarg
        if PY34:
            newnode = nodes.Arguments(
                vararg.arg if vararg else None, kwarg.arg if kwarg else None, parent
            )
        else:
            newnode = nodes.Arguments(vararg, kwarg, parent)
        args = [self.visit(child, newnode) for child in node.args]
        defaults = [self.visit(child, newnode) for child in node.defaults]
        varargannotation = None
        kwargannotation = None
        # change added in 82732 (7c5c678e4164), vararg and kwarg
        # are instances of `_ast.arg`, not strings
        if vararg:
            if PY34:
                if node.vararg.annotation:
                    varargannotation = self.visit(node.vararg.annotation, newnode)
                vararg = vararg.arg
        if kwarg:
            if PY34:
                if node.kwarg.annotation:
                    kwargannotation = self.visit(node.kwarg.annotation, newnode)
                kwarg = kwarg.arg
        if PY3:
            kwonlyargs = [self.visit(child, newnode) for child in node.kwonlyargs]
            kw_defaults = [
                self.visit(child, newnode) if child else None
                for child in node.kw_defaults
            ]
            annotations = [
                self.visit(arg.annotation, newnode) if arg.annotation else None
                for arg in node.args
            ]
            kwonlyargs_annotations = [
                self.visit(arg.annotation, newnode) if arg.annotation else None
                for arg in node.kwonlyargs
            ]
        else:
            kwonlyargs = []
            kw_defaults = []
            annotations = []
            kwonlyargs_annotations = []

        newnode.postinit(
            args=args,
            defaults=defaults,
            kwonlyargs=kwonlyargs,
            kw_defaults=kw_defaults,
            annotations=annotations,
            kwonlyargs_annotations=kwonlyargs_annotations,
            varargannotation=varargannotation,
            kwargannotation=kwargannotation,
        )
        # save argument names in locals:
        if vararg:
            newnode.parent.set_local(vararg, newnode)
        if kwarg:
            newnode.parent.set_local(kwarg, newnode)
        return newnode
def visit_arguments ( self , node , parent ) : vararg , kwarg = node . vararg , node . kwarg if PY34 : newnode = nodes . Arguments ( vararg . arg if vararg else None , kwarg . arg if kwarg else None , parent ) else : newnode = nodes . Arguments ( vararg , kwarg , parent ) args = [ self . visit ( child , newnode ) for child in node . args ] defaults = [ self . visit ( child , newnode ) for child in node . defaults ] varargannotation = None kwargannotation = None if vararg : if PY34 : if node . vararg . annotation : varargannotation = self . visit ( node . vararg . annotation , newnode ) vararg = vararg . arg if kwarg : if PY34 : if node . kwarg . annotation : kwargannotation = self . visit ( node . kwarg . annotation , newnode ) kwarg = kwarg . arg if PY3 : kwonlyargs = [ self . visit ( child , newnode ) for child in node . kwonlyargs ] kw_defaults = [ self . visit ( child , newnode ) if child else None for child in node . kw_defaults ] annotations = [ self . visit ( arg . annotation , newnode ) if arg . annotation else None for arg in node . args ] kwonlyargs_annotations = [ self . visit ( arg . annotation , newnode ) if arg . annotation else None for arg in node . kwonlyargs ] else : kwonlyargs = [ ] kw_defaults = [ ] annotations = [ ] kwonlyargs_annotations = [ ] newnode . postinit ( args = args , defaults = defaults , kwonlyargs = kwonlyargs , kw_defaults = kw_defaults , annotations = annotations , kwonlyargs_annotations = kwonlyargs_annotations , varargannotation = varargannotation , kwargannotation = kwargannotation , ) if vararg : newnode . parent . set_local ( vararg , newnode ) if kwarg : newnode . parent . set_local ( kwarg , newnode ) return newnode
visit an Arguments node by returning a fresh instance of it