summaryrefslogtreecommitdiff
path: root/tests/run/float_len_T480.pyx
blob: efb456c542889c411c16fe9c445d46c4b5043220 (plain)
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
# ticket: 480

def f(x):
    return x

def len_f(x):
    """
    >>> len_f([1,2,3])
    3
    """
    return len(f(x))

def float_len_f(x):
    """
    >>> float_len_f([1,2,3])
    3.0
    """
    return float(len(f(x)))

def cast_len_f(x):
    """
    >>> cast_len_f([1,2,3])
    3.0
    """
    return <double>len(f(x))