Skip to content

Instantly share code, notes, and snippets.

@scott-wilson
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scott-wilson/8864b3181d2f1988105c to your computer and use it in GitHub Desktop.
Save scott-wilson/8864b3181d2f1988105c to your computer and use it in GitHub Desktop.
C++ Question
class Foo(object):
def __init__(self, value):
self._value = value
class Bar(Foo):
def __init__(self, value):
value = do_something_to_value(value)
# Calls the parent class's version of __init__.
super(Bar, value).__init__(value)
def do_something_to_value(value):
return value * 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment