Super Python (part 2)
Super Python (part 2)
Posted Apr 29, 2022 23:20 UTC (Fri) by NYKevin (subscriber, #129325)In reply to: Super Python (part 2) by NYKevin
Parent article: Super Python (part 2)
Just to make this a bit more explicit: When I said "you generally won't have a problem," my assumption was that you either blindly call super() to do "whatever the parent class wants to do," or you completely fulfill the documented contract on your own, without worrying about which superclass actually gets involved. The whole point of the Liskov Substitution Principle is that this should be a safe thing to do; if your code violates LSP, then you are not really doing OOP in the first place.