range or xrange disallowed for big numbers

Mark Day mday at apple.com
Fri Oct 4 20:09:40 EDT 2002


In article <mailman.1033770729.3547.python-list at python.org>,
<sismex01 at hebmex.com> wrote:

> def XXRange(*args):
>     if len(args) not in (1,2,3):
>         raise ValueError("You must specify 1, 2 or 3 arguments only.")
>     if len(args) == 1:
>         start, finish, step = 0, args[0], 1
>     elif len(args) == 2:
>         start, finish = args
>         finish = 1

Should be:
         step = 1

>     else:
>         start, finish, step = args

-Mark



More information about the Python-list mailing list