summaryrefslogtreecommitdiff
path: root/docs/examples/tutorial/pure/A.py
blob: 98d5530c8632ae0e7db3fe4564f2d4509b30e630 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
def myfunction(x, y=2):
    a = x - y
    return a + x * y

def _helper(a):
    return a + 1

class A:
    def __init__(self, b=0):
        self.a = 3
        self.b = b

    def foo(self, x):
        print(x + _helper(1.0))