1# class with __init__
2
3class C1:
4    def __init__(self):
5        self.x = 1
6
7c1 = C1()
8print(type(c1) == C1)
9print(c1.x)
10
11class C2:
12    def __init__(self, x):
13        self.x = x
14
15c2 = C2(4)
16print(type(c2) == C2)
17print(c2.x)
18
19# __init__ should return None
20class C3:
21    def __init__(self):
22        return 10
23try:
24    C3()
25except TypeError:
26    print('TypeError')
27