Python's try-finally is simple

Beyond its basic function, there are 2 rules to know:

@lambda f: print(f())  # 2
def finally1():
    """
    NOTE:Rule No.1:
        The return value of a function is
            determined by the last return
            statement executed.
        Since finally clause always
            executes, there can be many return
            statement executions.
    """
    while 1:
        try:
            try:
                return 0
            finally:
                return 1
        finally:
            break
    return 2

@lambda f: print(f())   # 6 (no error)
def finally2():
    """
    NOTE:Rule No.2:
        If the finally clause executes
            a return, break or continue
            statement, that jumps out
            of the finally clause, the
            saved exception is discarded.
    """
    for i in range(10):
        try:
            1/0
        finally:
            if i > 5:
                break
            else:
                continue
    return i

Welcome to Nikola

Nikola Tesla Corner by nicwest, on Flickr

If you can see this in a web browser, it means you managed to install Nikola, and build a site using it. Congratulations!

Next steps:

Send feedback to info@getnikola.com!

\begin{equation*} \int \frac{dx}{1+ax}=\frac{1}{a}\ln(1+ax)+C \end{equation*}

hello.py (Source)

def hello(name='world'):
    greeting = "hello " + name
    print(greeting)
line1 = 1
line2 = 2
line3 = 3
line4 = 4
line5 = 5