Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Ok, maybe argspec's format isn't the best after all: This takes an
argspec and returns (regularArguments, [(kwarg, kwval), (kwarg, kwval)]).

        def getBetterThanArgspec(argspec):
    """Ok, maybe argspec's format isn't the best after all: This takes an
    argspec and returns (regularArguments, [(kwarg, kwval), (kwarg, kwval)])."""
    args = argspec[0]
    defaults = argspec[-1]
    if not defaults:
        return (args, [])
    backargs = args[:]
    backargs.reverse()
    defaults = list(defaults)
    defaults.reverse()
    kws = zip(backargs, defaults)
    kws.reverse()
    return (args[:-len(kws)], kws)
        


src/p/y/pydoctor-0.5/pydoctor/test/test_formatting.py   pydoctor(Download)
def test_signatures():
    argspec = [['a', 'b', 'c'], None, None, (1,2)]
    assert html.getBetterThanArgspec(argspec) == (['a'], [('b', 1), ('c', 2)])
 
def test_strsig():