Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
We need a way to make use of the code that lives in our classes' superclasses. I bet there's a way to do this!
The super()
function lets us call a bit of code from the parent class inside our own class. This is really helpful when you need to override a method from the superclass, defining your own version, but keep the effects of the parent class's version of the code.
For more about super()
than you probably want to know at this point, check out this blog post from the excellent Raymond Hettinger.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up