Session 8: Properties and Magic methods

More OO: Properties and Magic methods.

Pre-class prep

Readings

Read:

About Python’s “magic methods”:

https://www.python-course.eu/python3_magic_methods.php

http://minhhh.github.io/posts/a-guide-to-pythons-magic-methods

A Good Book (dead trees version only):

Python 3 Object Oriented Programming: Dusty Phillips

(Dusty is a local boy and co-founder of PuPPy)

And:

In-class Activities

Exercises

Finish (or make more progress on…) html_render.

Circle Class Exercise

Optional: Sparse Array Exercise

This one is challenging – if you have got html_render and circle class done, then by all means – it’s a great exercise. but if you are still struggling with html_render – get that done first.

Post-class Activities

Finish the exercises

Look at the next session for reading, etc:

Session 9: Static and class methods: multiple inheritance