Skip to content

Instantly share code, notes, and snippets.

@nenetto
Created September 26, 2023 06:43
Show Gist options
  • Save nenetto/0fc3bb90c4532e1390533473ba40b20f to your computer and use it in GitHub Desktop.
Save nenetto/0fc3bb90c4532e1390533473ba40b20f to your computer and use it in GitHub Desktop.
Class super for initialization
class MyBaseClass:
def __init__(self, value):
self._value = value
class Explicit(MyBaseClass):
def __init__(self, value):
super(__class__, self).__init__(value * 2)
class Implicit(MyBaseClass):
def __init__(self, value):
super().__init__(value * 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment