You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mixing the concepts of exception and inheritance could be confusing here. Could introduce inheritance first, then introduce the use case of exception as a use of that.
I agree that it would be good to disentangle these two points. The only reason I used exceptions here is because it's the main place in the Python standard library (that I could find) where inheritance was used significantly, and in ways that could be easily demonstrated and be found useful.
My concern with the proposed fix is that now we have introduced both class definitions and subclass definitions in a single line, whereas the aim of this episode was to use existing classes but not define any fresh ones. We'd be replacing one mix of concepts with another.
Mixing the concepts of exception and inheritance could be confusing here. Could introduce inheritance first, then introduce the use case of exception as a use of that.
Something like:
followed by
Would be very nice if we could find an example like this which could be extended (i.e. by adding a body to the class) in later episodes?
The text was updated successfully, but these errors were encountered: