In [22]:
iAmUndefined
print "after undefined name in module" # Will this be executed?
In [23]:
def surprise_function():
maybeIamDefinedMaybeNot
print "after undefined name in function" # Will this be executed?
maybeIamDefinedMaybeNot = 'I am defined as global to the module'
surprise_function()
print "after first function call" # Will this be executed?
del maybeIamDefinedMaybeNot
surprise_function()
print "after second function call" # Will this be executed?