would break the Liskov substitution principle, yes. Anything that
asks for a Student instance should receive an object that can do at
least everything Student can do.
If you want to implement something that can't do some of the things
Student can do, the Liskov substitution principle says you a
On Sat, Jul 16, 2011 at 10:04 AM, Ben Finney wrote:
> def study(self, subject):
> raise NotImplementedError
>
> See? We can have overstretched analogies *and* remain within the Liskov
> substitution principle.
>
Hehe! Of course I was speaking utterly in jes
Chris Angelico writes:
> The analogy with reality breaks down a bit here. I've seen plenty of
> students with no idea of what it means to study. But Python can handle
> that too - just 'del' the method in the subclass.
No, please don't. That would break the Liskov