3 ms·
Yeah, that's an example of inheritance not working. Python does support multi-inheritance, but it's messy. Best you can do is interfaces instead of subclasses.
by hot_gril 4y ago
Yeah, that's an example of inheritance not working. Python does support multi-inheritance, but it's messy. Best you can do is interfaces instead of subclasses. Honestly can't remember the last time I've subclassed something and actually cared to inherit methods/variables.
- rileyphone 4y agoThat's because there are two separate types of inheritance that often get conflated in popular OOP languages: subclassing (implementation inheritance) and subtyping (specification inheritance). The 'types' here are the interfaces in typical OOP languages, though their (especially Java) failure to orient types around them create much of the pain developers experience. See https://www.cs.utexas.edu/~wcook/papers/InheritanceSubtyping90/CookPOPL90.pdf https://www.cs.utexas.edu/~wcook/papers/InheritanceSubtyping...