May 2018
Beginner to intermediate
282 pages
7h 58m
English
The simpler call to super(), without any arguments, will save you some typing in Python 3:
|
Python 2 |
Python 3 |
class CoolMixin(object):
def do_it(self):
return super(CoolMixin,
self).do_it() |
class CoolMixin: def do_it(self): return super().do_it() |
Specifying the class name and instance is optional, thereby making your code DRY and less prone to errors while refactoring.
Read now
Unlock full access