This the the core notebook for nbdev tutorial
def say_hi(to):
    '''say hi to person 'to' ''' 
    return f"hi {to}"

say_hi[source]

say_hi(to)

say hi to person 'to'

say_hi("Sergi")
'hi Sergi'
test_eq(say_hi("Andy"), "hi Andy")
assert say_hi("Katy") == "hi Katy"

Classes

class hiSayer:
    "Dumb class to spam hi"
    def __init__(self, to):
        self.to = to
    
    def say(self):
        "Calls function say hi"
        return say_hi(self.to)

class hiSayer[source]

hiSayer(to)

Dumb class to spam hi

hiSayer.say[source]

hiSayer.say()

Calls function say hi

hiSayer say hi to whoever we want with the method say

sayer = hiSayer("Alex")
sayer.say()
'hi Alex'

Plots in Documentation

plt.plot(np.cosh(np.linspace(-2,2,1000)))
plt.grid()