B szstrseq..N)typertuple)r r8r3r )r8r3r r6sr6cCsd|S)N*r )namer r r r>cCsd|S)Nz**r )r=r r r r>r?cCs dt|S)N=)repr)valuer r r r>r?c Csg} |rt|t|} xNtt|D]>} t|| ||} |rZ| | krZ| ||| | } | | q&W|dk r~| |||dk r| ||dd| dS)amFormat 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. Nr0z, r1)r2rr6appendr3) r#r%r&defaults formatarg formatvarargs formatvarkw formatvaluer3specsZ firstdefaultr$specr r r rs cCsd|S)Nr<r )r=r r r r>r?cCsd|S)Nz**r )r=r r r r>r?cCs dt|S)Nr@)rA)rBr r r r>r?c Cs|||fdd} g} x*tt|D]} | t|| | |q"W|r^| ||||||r|| |||||dd| dS)alFormat an argument spec from the 4 values returned by getargvalues. The first four arguments are (args, varargs, varkw, locals). The next 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. cSs|||||S)Nr )r=localsrErHr r r r8sz formatargvalues..convertr0z, r1)rr2rCr6r3) r#r%r&rKrErFrGrHr3r8rIr$r r r formatargvaluessrL)__doc__Z __future__rrrr__all__r rrZ CO_OPTIMIZEDZ CO_NEWLOCALSrrr'rr/r5r6strrrLr r r r s.