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
Extends overridden subclass behavior by calling a superclass method or constructor.
How deep it goes
Explains super() as a proxy and demonstrates method and constructor calls; limits its MRO discussion to single inheritance.
Examples
Uses a Supervisor logout override and a PokerOrder int subclass that maps face cards for sorting.
What you can do after
Apply super() to reuse a superclass implementation while customizing a subclass method or constructor.

Read how Python How-To explains super keyword →

Related concepts

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.