CSC148H1 Lecture Notes - Lecture 7: Docstring, Type Signature, List Comprehension
katrinasavvy and 38715 others unlocked
1
CSC148H1 Full Course Notes
Verified Note
1 document
Document Summary
Csc148- lecture 8- list comprehension and abstract data types (adts) References: code seen in the pictures can be found on the csc148 website: http://www. teach. cs. toronto. edu/~csc148h/winter/ Assignment 1 is due january 30, 2018 at 10pm on markus. If you want to change your lab time, email csc14818s@cs. toronto. edu with a valid reason. Don"t maintain documentation in 2 places (e. g. superclass and subclass) unless there"s o other choice. Inherited methods, attributes- no need to document again: extended method, attributes- document that they"re extended and how, e. g. What you added to rightangletriangle __init_: overridden methods, attributes- document that they"re overridden and how, document docstring, type signature, etc. Be sure to always include functional style of annotation: e. g. de __init__(self, num : int, name: str) -> none, also indicate the return type. Annotate attributes similarly: e. g. x: int. When you have class hierarchy and calling method on class, it"s confusing to remember where the method was defined.