class IntStack(Stack)
and we can access the parent methods with Stack.method(...). This is really suitable for our first year goal - obtaining laziness.
Another big big topic - exception, was 'raised' this week. We can create our own type of exception just by using inheritance:
XXXError(Exception)
We can raise one when something you don't want to see appears. However, when something wrong goes into the program and you don't want the whole program to stop, an Try option can be built in the code.
try:
blah blah blah
except:
blah blah blathe
The lab and exercise went pretty well and I hope I will start my assignment soon since it's busy these days.
The lab and exercise went pretty well and I hope I will start my assignment soon since it's busy these days.
Let's have a chat some time next week.
No comments:
Post a Comment