def range(*args):
    if len(args) > 3:
        raise TypeError('range expected at most 3 arguments, got %d' % len(
            args))
if len(args) == 2:
    return list(range(args[0], args[1], 1))
if len(args) == 1:
    return list(range(0, args[0], 1))
else:
    pass
How does the Python range function have a default parameter before the actual one?