Did I find the right examples for you? yes no

All Samples(886)  |  Call(867)  |  Derive(0)  |  Import(19)
Format an argument spec from the 4 values returned by getargspec.

The first four arguments are (args, varargs, varkw, defaults).  The
other four arguments are the corresponding optional formatting functions
that are called to turn names and values into strings.  The ninth
argument is an optional function to format the sequence of arguments.

        def formatargspec(args, varargs=None, varkw=None, defaults=None,
                  formatarg=str,
                  formatvarargs=lambda name: '*' + name,
                  formatvarkw=lambda name: '**' + name,
                  formatvalue=lambda value: '=' + repr(value),
                  join=joinseq):
    """Format an argument spec from the 4 values returned by getargspec.

    The first four arguments are (args, varargs, varkw, defaults).  The
    other four arguments are the corresponding optional formatting functions
    that are called to turn names and values into strings.  The ninth
    argument is an optional function to format the sequence of arguments."""
    specs = []
    if defaults:
        firstdefault = len(args) - len(defaults)
    for i, arg in enumerate(args):
        spec = strseq(arg, formatarg, join)
        if defaults and i >= firstdefault:
            spec = spec + formatvalue(defaults[i - firstdefault])
        specs.append(spec)
    if varargs is not None:
        specs.append(formatvarargs(varargs))
    if varkw is not None:
        specs.append(formatvarkw(varkw))
    return '(' + string.join(specs, ', ') + ')'
        


src/i/r/ironpython3-HEAD/Src/StdLib/Lib/xmlrpc/server.py   ironpython3(Download)
            # confusing to the non-Python user
            argspec = inspect.formatargspec (
                    args.args[1:],
                    args.varargs,
                    args.varkw,
            args = inspect.getfullargspec(object)
            argspec = inspect.formatargspec(
                args.args, args.varargs, args.varkw, args.defaults,
                annotations=args.annotations,
                formatvalue=self.formatvalue)

src/d/j/django-cbv-inspector-HEAD/cbv/management/commands/populate_cbv.py   django-cbv-inspector(Download)
            # Get the method arguments
            i_args, i_varargs, i_keywords, i_defaults = inspect.getargspec(member)
            arguments = inspect.formatargspec(i_args, varargs=i_varargs, varkw=i_keywords, defaults=i_defaults)
 
            return code, arguments, start_line

src/c/p/cpython-HEAD/Lib/xmlrpc/server.py   cpython(Download)
            # confusing to the non-Python user
            argspec = inspect.formatargspec (
                    args.args[1:],
                    args.varargs,
                    args.varkw,
            args = inspect.getfullargspec(object)
            argspec = inspect.formatargspec(
                args.args, args.varargs, args.varkw, args.defaults,
                annotations=args.annotations,
                formatvalue=self.formatvalue)

src/s/t/static-python-HEAD/Lib/xmlrpc/server.py   static-python(Download)
            # confusing to the non-Python user
            argspec = inspect.formatargspec (
                    args.args[1:],
                    args.varargs,
                    args.varkw,
            args = inspect.getfullargspec(object)
            argspec = inspect.formatargspec(
                args.args, args.varargs, args.varkw, args.defaults,
                annotations=args.annotations,
                formatvalue=self.formatvalue)

src/p/y/python-future-HEAD/future/backports/xmlrpc/server.py   python-future(Download)
            # confusing to the non-Python user
            argspec = inspect.formatargspec (
                    args.args[1:],
                    args.varargs,
                    args.varkw,
            args = inspect.getfullargspec(object)
            argspec = inspect.formatargspec(
                args.args, args.varargs, args.varkw, args.defaults,
                annotations=args.annotations,
                formatvalue=self.formatvalue)

src/c/l/classify-0.5.0/classify/library.py   classify(Download)
        # Get the method arguments
        args, varargs, keywords, defaults = inspect.getargspec(func)
        arguments = inspect.formatargspec(args, varargs=varargs, varkw=keywords, defaults=defaults)
 
        # Get source line details

src/c/l/classify-HEAD/classify/library.py   classify(Download)
        # Get the method arguments
        args, varargs, keywords, defaults = inspect.getargspec(func)
        arguments = inspect.formatargspec(args, varargs=varargs, varkw=keywords, defaults=defaults)
 
        # Get source line details

src/m/a/main-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Lib/pydoc.py   main(Download)
            args, varargs, varkw, defaults = inspect.getargspec(object)
            argspec = inspect.formatargspec(
                args, varargs, varkw, defaults, formatvalue=self.formatvalue)
            if realname == '<lambda>':
                title = '<strong>%s</strong> <em>lambda</em> ' % name
            args, varargs, varkw, defaults = inspect.getargspec(object)
            argspec = inspect.formatargspec(
                args, varargs, varkw, defaults, formatvalue=self.formatvalue)
            if realname == '<lambda>':
                title = self.bold(name) + ' lambda '

src/m/a/main-HEAD/External.LCA_RESTRICTED/Languages/CPython/27/Lib/pydoc.py   main(Download)
            args, varargs, varkw, defaults = inspect.getargspec(object)
            argspec = inspect.formatargspec(
                args, varargs, varkw, defaults, formatvalue=self.formatvalue)
            if realname == '<lambda>':
                title = '<strong>%s</strong> <em>lambda</em> ' % name
            args, varargs, varkw, defaults = inspect.getargspec(object)
            argspec = inspect.formatargspec(
                args, varargs, varkw, defaults, formatvalue=self.formatvalue)
            if realname == '<lambda>':
                title = self.bold(name) + ' lambda '

src/p/y/pydroid-HEAD/src/pydroid/framework/project_skeleton/libs/python27/lib/python2.7/pydoc.py   pydroid(Download)
            args, varargs, varkw, defaults = inspect.getargspec(object)
            argspec = inspect.formatargspec(
                args, varargs, varkw, defaults, formatvalue=self.formatvalue)
            if realname == '<lambda>':
                title = '<strong>%s</strong> <em>lambda</em> ' % name
            args, varargs, varkw, defaults = inspect.getargspec(object)
            argspec = inspect.formatargspec(
                args, varargs, varkw, defaults, formatvalue=self.formatvalue)
            if realname == '<lambda>':
                title = self.bold(name) + ' lambda '

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next