"lm_eval/tasks/drop.py" did not exist on "5888a6959aec906f6e15274cc8752e778b2e73f7"
overload_usecases.py 582 Bytes
Newer Older
dugupeiwen's avatar
dugupeiwen committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Python 3 syntax only use cases, used in test_extending.py

# arg name is different, and there's no arg name to match before *args


def impl4(z, *args, kw=None):
    if z > 10:
        return 1
    else:
        return -1

# arg name is different but at a detectable location, with *args


def impl5(z, b, *args, kw=None):
    if z > 10:
        return 1
    else:
        return -1


def var_positional_impl(a, *star_args_token, kw=None, kw1=12):
    def impl(a, b, f, kw=None, kw1=12):
        if a > 10:
            return 1
        else:
            return -1
    return impl