In [5]:
%xmode plain


Exception reporting mode: Plain

In [16]:
first_name = "Zaphod"

def hello(name):
    """Say hello"""
    print "Hello, {}".format(name)

def hello_multi(name, greeting_mult=1):
    """Say hello gratuitously"""
    greeting_count = 3 * greeting_mult
    for num in range(greeting_count):
        hello(name)
    return greeting_count

hello(first_name)
gc = hello_multi("Startibartfast")


Hello, Zaphod
Hello, Startibartfast
Hello, Startibartfast
Hello, Startibartfast

In [17]:
del(first_name)
print hello(first_name)


Traceback (most recent call last):

  File "<ipython-input-17-167a5e02a5c1>", line 2, in <module>
    print hello(first_name)

NameError: name 'first_name' is not defined

In [18]:
del(hello)
print hello_multi("Startibartfast")


Traceback (most recent call last):

  File "<ipython-input-18-80349872a6c1>", line 2, in <module>
    print hello_multi("Startibartfast")

  File "<ipython-input-16-f29513c8ac80>", line 11, in hello_multi
    hello(name)

NameError: global name 'hello' is not defined