text
stringlengths
1
81
start
float64
0
10.1k
duration
float64
0
24.9
super. double init yes but in this case
8,944.2
6.8
I'm only passing a name on line 18 and
8,948.359
5.761
I'm only passing in name on line 10 why
8,951
5.319
because on line two when I Define the in
8,954.12
4.64
it method for the wizard class I only
8,956.319
4.96
expect a single argument but I could
8,958.76
3.92
absolutely have under common
8,961.279
2.681
functionality like I could add in a
8,962.68
3.36
petronis if both students and professors
8,963.96
3.72
have patronises that can come out of
8,966.04
4.16
their wands I could have two arguments
8,967.68
4.719
instead we've been using this feature of
8,970.2
3.84
object-oriented programming now for
8,972.399
3.561
quite some time in the form of
8,974.04
3.8
exceptions indeed if you look at the
8,975.96
3.92
official documentation for exceptions in
8,977.84
3.96
Python you'll see that there's not even
8,979.88
3.68
the ones we've seen in class like value
8,981.8
3.8
error and others there's any number of
8,983.56
4.48
others as well but they are all
8,985.6
4.4
themselves hierarchical in nature this
8,988.04
4.279
is just a subset of the available
8,990
4.2
exceptions that come built into Python
8,992.319
3.681
and you can actually as a programmer
8,994.2
4
create your own exceptions as well but
8,996
4.92
as this chart here uh captures
8,998.2
5.199
hierarchically all exceptions we've seen
9,000.92
5.24
thus far actually descend from or
9,003.399
5.721
inherit from Super classes already so
9,006.16
4.48
for instance at the bottom of this list
9,009.12
3.199
here is value error which we've seen
9,010.64
3.92
quite a bit and if you follow the line
9,012.319
4.441
straight up on this asky rendition of
9,014.56
4.6
this chart you'll see that value error
9,016.76
4.559
has a parent class or super class called
9,019.16
4
exception and the exception class
9,021.319
3.881
meanwhile has a parent class called base
9,023.16
4.199
exception why did the authors of python
9,025.2
4.04
do this well it turns out that whether
9,027.359
5.441
you have a uh value error or a key error
9,029.24
5.48
or an assertion error or any number of
9,032.8
4.4
others there's a lot of functionality
9,034.72
5.48
common to all of those types of errors
9,037.2
5.84
that you want uh all that you want a
9,040.2
5.36
programmer to be able to use and so it
9,043.04
4.2
turns out that the the authors of python
9,045.56
3.799
decided you know what let's not have a
9,047.24
5.159
dozen or more different classes that all
9,049.359
4.761
just have copy pasted similar
9,052.399
3.441
functionality let's create this
9,054.12
3.56
hierarchy so that even though the
9,055.84
3.28
exceptions toward the bottom of this
9,057.68
3.719
list are very precise they at least
9,059.12
4.84
inherit that is borrow some very common
9,061.399
4.761
functionality up above so it turns out
9,063.96
4.2
that when you use the try and the accept
9,066.16
4.36
keyword in Python generally speaking
9,068.16
4.4
we've tried to catch very specific
9,070.52
4.04
exceptions like value error but
9,072.56
4.36
technically you could capture the parent
9,074.56
4.44
or even the grandparent exception
9,076.92
4.16
forgiven exception especially if you're
9,079
3.72
not necessarily sure which one is going
9,081.08
3.96
to get raised or better yet there could
9,082.72
4.28
be many exceptions that get raised but
9,085.04
3.92
you want to handle them all the same and
9,087
3.6
you don't want to necessarily enumerate
9,088.96
3.88
them in parentheses separated by commas
9,090.6
3.759
you want to say you want to handle all
9,092.84
4.04
exceptions of a certain super class in
9,094.359
4.681
much the same way so this has been
9,096.88
3.84
latent this whole time anytime we've
9,099.04
4.04
seen or used or caught or now raised
9,100.72
4.599
exceptions and built into python is this
9,103.08
3.68
hierarchy and if you were to invent your
9,105.319
3.521
own exception generally you wouldn't
9,106.76
3.48
want to start from scratch you would
9,108.84
4.08
want to descend from that is subass one
9,110.24
4.6
of these existing exceptions and add
9,112.92
3.88
your own twist on it your own
9,114.84
4.92
functionality as well well there's one
9,116.8
4.639
final feature of object-oriented
9,119.76
3.44
programming that we'd like to share with
9,121.439
4.081
you today and that it will perhaps be
9,123.2
3.96
quite the eyeopener is what you can
9,125.52
3.6
really do now that you have classes at
9,127.16
4.8
your disposal and this too surprise has
9,129.12
4.08
been a feature you and I have been
9,131.96
3.56
taking for granted for weeks now this
9,133.2
3.92
has just worked but it's been
9,135.52
3.28
implemented in a way that you can now
9,137.12
4.04
leverage yourself it turns out that
9,138.8
4.36
Python and some other languages too
9,141.16
4.199
support this notion of operator
9,143.16
4.6
overloading whereby you can take very
9,145.359
5.561
common symbols like plus or minus or
9,147.76
6.08
other such syntax on the on the keyboard
9,150.92
4.88
and you can Implement your own
9,153.84
4.479
interpretation thereof plus does not
9,155.8
5.72
have to equal uh addition and minus does
9,158.319
5