Several elements have been covered so far including writing classes and subclass (of which there was a more than slightly frustrating assignment on, but I'll talk about that later, tracing recursive functions, and characteristics and methods of stacks. Most of the topics have been fairly straight forward with examples provided in class but there were a few aspects that remained blurry until it was necessary to implement them in the assignment. Specifically, the purpose and implementation of the __repr__() method. As it was absolutely necessary to implement this function in every class we wrote for the assignment, pushing off understanding it simply wasn't an option. After going over class notes, google-ing, and asking classmates, I finally figured out how to implement the method and was able to finish the rough bulk work for the assignment (yay~), that is, until the dreaded error messages starting appearing when I ran the program to test it......
No comments:
Post a Comment