summaryrefslogtreecommitdiff
path: root/tests/run/builtin_float.py
blob: f2eff2be843ef1ad65645c7a045e69c3ce71ce57 (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
26
27
28
29
30
31
32
33
34

import sys

def empty_float():
    """
    >>> float()
    0.0
    >>> empty_float()
    0.0
    """
    x = float()
    return x

def float_conjugate():
    """
    >>> float_call_conjugate()
    1.5
    """
    if sys.version_info >= (2,6):
        x = 1.5 .conjugate()
    else:
        x = 1.5
    return x

def float_call_conjugate():
    """
    >>> float_call_conjugate()
    1.5
    """
    if sys.version_info >= (2,6):
        x = float(1.5).conjugate()
    else:
        x = 1.5
    return x