[Tutor] Inheritance vs Assignment

kay Cee unee0x at gmail.com
Wed Aug 31 23:18:06 EDT 2016


Suppose there is ----->

Class a():
     def__init__(self, var):
            pass

Class b(a):
     def__init__(self):
     super().__init__(self, var)
            pass

Note: syntax may be incorrect ...

Is it better to do

b = a()

Instead of making b its own class?
Also, what would be the benefit of making a separate class for b if any at all?

Thanks in advance ....

Unee0x


More information about the Tutor mailing list