liveBook · Manning

Super keyword

The super construct accesses or invokes inherited methods, constructors, or attributes according to a language’s inheritance rules.

How 6 Manning books explain it

The Well-Grounded Rubyist, Fourth Edition

super is a Ruby keyword that invokes the next implementation of the current method in the method-lookup path, preserving the current call's arguments and block when no argument syntax is supplied.

How it is used
Uses `super` to wrap an existing method while retaining the next implementation’s behavior.
How deep it goes
Explains lookup-path traversal and argument forwarding, contrasting bare `super` with `super()`.
Examples
Uses a class-and-module `report`, a bicycle initializer, missing-method handlers, and an object-specific `String#gsub!` wrapper.
What you can do after
Evaluate/understand which method an override calls next and when its original arguments and block pass through.

Read how The Well-Grounded Rubyist, Fourth Edition explains super keyword →

The Well-Grounded Python Developer: How the pros use Python and Flask

super is a Python mechanism that provides access to methods and other attributes defined in a class's parent according to the method resolution order.

How it is used
Delegates subclass initialization to parent constructors within shape hierarchies.
How deep it goes
Explains parent-constructor delegation through Square and Circle examples, without detailing broader method-resolution behavior.
Examples
Uses Square, Rectangle, Shape, and Circle classes with delegated dimensions and shape-specific drawing.
What you can do after
Apply it via Python to reuse parent initialization while customizing subclass-specific parameters and behavior.

Read how The Well-Grounded Python Developer: How the pros use Python and Flask explains super keyword →

Kotlin in Action, 2E

How it is used
Resolves inherited interface implementations and initializes superclass constructors from Kotlin subclasses.
How deep it goes
Explains qualified interface calls, constructor delegation paths, and Java syntax differences without descending into compiler-generated bytecode.
Examples
Uses Button with Clickable and Focusable, plus MyDownloader delegating to String and URI superclass constructors.
What you can do after
Apply it via Kotlin syntax to select inherited interface behavior and delegate subclass construction to superclass constructors.

Read how Kotlin in Action, 2E explains super keyword →

Essential TypeScript 5, Third Edition

The super keyword accesses a class's superclass constructor, properties, or methods.

How it is used
Connects subclass constructors and methods to inherited implementation while extending JavaScript and TypeScript classes.
How deep it goes
Explains constructor ordering, inherited initialization, method reuse, and overriding, but does not detail prototype internals.
Examples
Uses Product and TaxedProduct classes plus Person and Employee classes to demonstrate initialization and inherited behavior.
What you can do after
Build subclass constructors and overridden methods that reuse superclass initialization and behavior.

Read how Essential TypeScript 5, Third Edition explains super keyword →

Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond

A JavaScript keyword used in a subclass to invoke superclass constructors or access superclass methods and properties.

How it is used
Uses super to initialize subclass instances and reuse superclass behavior.
How deep it goes
Explains constructor ordering, prototype method access, and why instance class properties are unavailable through super.
Examples
Shows TeamStore passing a URL to DataStore, ProductStore extending fetch, and binding an overridable method.
What you can do after
Apply super to initialize subclasses before using this and extend superclass methods without discarding their behavior.

Read how Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond explains super keyword →

Python How-To

How it is used
Uses `super()` in overridden methods to retain inherited behavior while adding subclass-specific actions.
How deep it goes
Defines `super()` as a proxy and demonstrates method and constructor delegation, while focusing MRO discussion on single inheritance.
Examples
Shows a supervisor extending logout behavior and a `PokerOrder` subclass mapping face cards to numeric values.
What you can do after
Apply `super()` to call inherited implementations from overridden methods and delegate object construction.

Read how Python How-To explains super keyword →

Also covered in

What to know first

Related concepts

Questions about super keyword

What is super keyword?

The super construct accesses or invokes inherited methods, constructors, or attributes according to a language’s inheritance rules.

Which Manning books explain super keyword?

The Well-Grounded Rubyist, Fourth Edition, The Well-Grounded Python Developer: How the pros use Python and Flask, Kotlin in Action, 2E, Essential TypeScript 5, Third Edition, Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond and Python How-To.

What should I know before learning super keyword?

Manning books that teach super keyword usually introduce attribute, inheritance, class and superclass first.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.