Here is 2 classes:
class Test(object):
def __init__(self, var1=123):
self.var1 = var1
class Test2(Test):
# ...
As you can see, Test2 is an instance of Test, which has var1. var1's default value is 123.
How can I change the var1 in Test2 without __init__ again? Or better yet, can I just do this (I know it doesn't work, but is there a way to make this work?):
class Test2(Test):
var1 = 1234
Secondly, how can I modify __init__ in Test2 without replacing all the code that's written in Test1?