blob: b890c9ffd22f432546d6e66c5a45e2d671fbcd0f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
cdef class Penguin:
cdef object food
def __cinit__(self, food):
self.food = food
def __init__(self, food):
print("eating!")
normal_penguin = Penguin('fish')
fast_penguin = Penguin.__new__(Penguin, 'wheat') # note: not calling __init__() !
|