CSCA08H3 Lecture Notes - Init, Camel Case
Document Summary
Class type of an object (data that they store) Ie) list class but each instantiation can be edited/changed. Don"t relaly need exs) in docstring (not new!) My_str is an object of str class & method ljust. Start with classname: camelcase not pot_hole_case: caps, no spaces/underscores. Must have __init__ (don"t expect user to ever call) Defines code that runs when new obj of this type is created. __str__ setup default parameter: returns desired output when object of this class is cast to a str or printed. Every method (built-in too) gets implicitly passed a copy of the obj itself. Don"t include in method call, method def"n.