2 ms·
It's not possible to use prototypal inheritance to mock even simple inheritance since “method = object.metod; method();” loose the reference to “this” as “objec
by amirouche 13y ago
It's not possible to use prototypal inheritance to mock even simple inheritance since “method = object.metod; method();” loose the reference to “this” as “object”, it's a gotcha in the lower level mode Veloce of Pythonium that I tried to explain in https://github.com/pythonium/pythonium/wiki/Pythonium-Veloce-Cookbook#methods-as-callbacks https://github.com/pythonium/pythonium/wiki/Pythonium-Veloce.... The MRO and thus multiple inhertiance is implemented in pythonium_create_class https://github.com/pythonium/pythonium/blob/master/pythonium/lib/runtime.py#L114 https://github.com/pythonium/pythonium/blob/master/pythonium...
- acjohnson55 13y agoYeah, that's why I phrased it "wrappers around". Check out https://github.com/lukasolson/Backbone-Super https://github.com/lukasolson/Backbone-Super for example, which wraps and replaces Backbone.extend.
- amirouche 13y agoI never mentionned super. Anyway, thanks for the link.