super or not super?

Paulo da Silva p_s_d_a_s_i_l_v_a_ns at netcabo.pt
Fri Jul 12 10:12:11 EDT 2019


Hi all!

Is there any difference between using the base class name or super to
call __init__ from base class?

class C1:
	def __init__(self):
		...

class C2(C1):
	def __init__(self):
		C1.__init__(self) or super().__init__() ??
		...

I have been using super, but I see some scripts where the base class
name is used.

Thanks for any comments.



More information about the Python-list mailing list