function with variable arguments

Steve lonetwin at gmail.com
Fri May 13 06:45:58 EDT 2005


On 5/13/05, Wolfram Kriesing <wolfram.kriesing at gmail.com> wrote:
> using default args does actually solve it
> what about
> def Range(n, m=None, step=None)
>   if step==None:
>     if m==None:
>       range(n)
>     else:
<...snip...>
....or better still :

def Range(*args):
    return range(*args)

Regards
Steve

PS: but what do I know, I'm a F'ing imcompetent ass



More information about the Python-list mailing list