say_hi
say_hi(to)
to
Say hi to someone
say_hi('Max')
Hi Max!
test_eq(say_hi('Max'), 'Hi Max!')
test_eq??
Same but with classes
class hiSayer: def __init__(self, to): self.to = to def say(self): """calls fn `say_hi`""" return say_hi(self.to)
class
hiSayer
hiSayer(to)
hiSayer.say
hiSayer.say()
calls fn say_hi
sayer = hiSayer('Maximilian') sayer.say()
'Hi Maximilian!'