My purpose is to override some of the functions of 'First' class run-time for certain cases. So I want to derive a class from the original one. Here is the code snippet.
class First(object):
def __init__(self):
print "First"
super(First, self).__init__()
def foo(self):
print "foo"
class Second(First):
def __init__(self):
print "second"
super(Second, self).__init__()
def foo(self):
print "want to override this"
First = Second
o = First()
Why the constructor goes into infinite loop? What wrong thing am doing?