Yea, this is actually inheritance - it's a mixin.
> This is not composition.
That's basically the author's point.
> Once I understood what they meant by “composition”, I was even more surprised to find that I agreed with this assertion.
Re:The Sororicide Antipattern
by porpoisemonkey on Friday June 02, 2017 @02:47AM
(#14467971)
Good point - I think I misunderstood the purpose of the article. I'll leave the original comment as a matter of record.
> Even if, right now, we were to change it to _note2, the maintainer of A could, in any future release of A, add a new _note2 variable which conflicts with something B is using.
This is why Python offers actual namespacing of properties and methods in the form of a double underscore (__). Double underscore prepends an underscore and the class name to the private property name which prevents these sorts of collisions.
> Uh oh. Looks like composition is worse than inheritance.This is not composition.