# examples of some bizarre ways you can bind objects to names

# define a function f
def f():
    
    # define a class X (bind the name X to the given class object)
    class X:
        import time                   # time is an attribute of class X that is
                                      # bound to the time module object
        def __init__(self):
            self.y = "hello world"
        
        def hello(self):
            print "hello world"
            return self.hello         
        
    # return the class object bound to the name X
    return X

z = f()

c = f()
t1 = c.time.time()
#do something
t2 = z.time.time()
print t2 - t1

instance = f()()
m = instance.hello()
q = m()
q()
