Python super()
super() lets you avoid referring to the base class explicitly, which can be nice. But the main advantage comes with multiple inheritance, where all sorts of fun stuff can happen. Note that the syntax changed in Python 3.0: you can just say super().__init__() instead of super(ChildB, self).__init__() which IMO is quite a bit nicer.
0 Comments 0 Shares 1419 Views
image/svg+xml


BigMoney.VIP Powered by Hosting Pokrov