This is the standard Python way to implement a “mixin”, although it’s a little confusing for people who are used to Java/C++ inheritance. Python’s super function is poorly named; it should really be something like next_in_method_resolution_order; if you check out help(Linear) at the interactive prompt it will tell you that its MRE is Linear, Bottle, nn.Linear, nn.Module, object, so calling Linear.forward will call Bottle.forward and the super call inside that method will call nn.Linear.forward.