Object Oriented Programing: classes, instance and class attributes, subclassing and inheritance.
.. toctree::
:maxdepth: 1
../modules/ObjectOrientationOverview
../modules/PythonClasses
../modules/SubclassingAndInheritance
Dive into Python3: 7.2 -- 7.3
Think Python: 15 -- 18
Python Class Toolkit by Raymond Hettinger
https://speakerdeck.com/pyconslides/pythons-class-development-toolkit-by-raymond-hettinger
The Art of Subclassing by Raymond Hettinger
http://pyvideo.org/video/879/the-art-of-subclassing
The most salient points from that video are as follows:
- Subclassing is not for Specialization
- Classes and subclassing are for code re-use -- not creating taxonomies
- Bear in mind that the subclass is in charge
Note that the previous talk and this one were back to back at PyCon -- but despite their contradictory titles -- they have similar messages.
by Jack Diederich
http://pyvideo.org/video/880/stop-writing-classes
"If your class has only two methods -- and one of them is __init__
-- you don't need a class"
.. toctree::
:maxdepth: 1
../exercises/oo_intro/oo_intro.rst
../exercises/html_renderer/html_renderer.rst
../exercises/html_renderer/html_renderer_tutorial.rst