Skip to content

Instantly share code, notes, and snippets.

@EdMan1022
Created September 21, 2018 15:08
Show Gist options
  • Save EdMan1022/a3c0b1db52fefdf43d5642488265efa4 to your computer and use it in GitHub Desktop.
Save EdMan1022/a3c0b1db52fefdf43d5642488265efa4 to your computer and use it in GitHub Desktop.
Quick dirty example of freely passing args to parent class
class ExampleParent(object):
def run(self, *args, **kwargs):
print(args[0])
print(kwargs['a'])
class ExampleChild(ExampleParent):
def run(self, *args, **kwargs):
super(ExampleChild, self).run(*args, **kwargs)
if __name__ == '__main__':
child = ExampleChild()
child.run(1, 2, 3, a='lol')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment