Sunday, 2 February 2014

Week 4

Recursion is the hot topic this week, but for the large part, that's a topic for another time. I already know the basics from beforehand, and I would say it is fair to say that recursion is surprisingly easier to understand than it is to explain without the use of aids.

So, without further delay, rather sure than talk about recursion, I will talk about errors and exceptions. The basic concept is rather simple, plan ahead for errors that might occur, and deal with them. That said, it took me quite a while to figure out what Exercise 2 meant when it said to raise an exception implicitly, even though, as it turned out, I had done it that way all along. Using unittest to check if an exception is properly raised was also an annoyance during the lab, thanks to the not entirely intuitive way that assertRaises works, and the Library not being entirely clear on that.

No comments:

Post a Comment