Changes

Jump to: navigation, search

Rchan sandbox

503 bytes added, 17:03, 3 November 2019
Part 2 - Special object methods
</source>
::* Note: if you have python code attached to both the __str__ and __repr__ special method, the print() function will use the string return by the __str__ method. If __str__ is not defined, the print() function will use the string return by __repr__.
 
:8. Download the checking script and check your work. Enter the following commands from the bash shell.<source lang="bash">
cd ~/ops435/lab7/
pwd #confirm that you are in the right directory
ls CheckLab7.py || wget https://ict.senecacollege.ca/~raymond.chan/ops435/labs/LabCheckScripts/CheckLab7.py
python3 ./CheckLab7.py -f -v lab7d
</source>
:9. Before proceeding, make certain that you identify all errors in lab7a.py. When the checking script tells you everything is OK - proceed to the next step.
== Part 3 - Operator overloading ==
1,760
edits

Navigation menu