Open
Description
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:
class MyArray(numpy.ndarray):
pass
followed by
a = MyArray(shape=(10,10))
type(a) # shows MyArray
isinstance(a, MyArray)
isinstance(a, np.ndarray)
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?
Metadata
Metadata
Assignees
Labels
No labels