3 ms·
No, but it might be an argument for not using generic interfaces where an implementation that literally does anything at all might be passed in. In C# and simi
by wizofaus 4y ago
No, but it might be an argument for not using generic interfaces where an implementation that literally does anything at all might be passed in. In C# and similar languages this could be done with an abstract base class with an internal constructor for instance. No idea if Python supports anything like that.
- goto11 4y agoIsn't this the approach the article is recommending against? Prefer composition over inheritance.
- wizofaus 4y agoThe logging target may be a property that is part of the composition of the logger itself, but it would still need to support interface- or abstract-"inheritance" (even if via duck-typing) to be useful.